Classes Files

Wombat::MamaInboxCallback

Provides an object-oriented callback interface for a MamaInbox response to a p2p message being received or when an error is encountered during p2p messaging

Public Functions

  Name
void onMsg(MamaInbox inbox, MamaMsg message)
Invoked in response to a p2p message being received. Note: you can obtain a reference to the user-supplied data passed to the create method by calling getClosure on the MamaInbox instance
void onError(MamaInbox inbox, MamaStatus.mamaStatus status)
NB. Not currently used. Invoked when an error is encountered during p2p messaging. Note: you can obtain a reference to the user-supplied data passed to the create method by calling getClosure on the MamaInbox instance
void onDestroy(MamaInbox inbox, object closure)
This method is invoked when an inbox has been completely destroyed, the client can have confidence that no further events will be placed on the queue for this inbox.

Public Functions Documentation

function onMsg

void onMsg(
    MamaInbox inbox,
    MamaMsg message
)

Invoked in response to a p2p message being received. Note: you can obtain a reference to the user-supplied data passed to the create method by calling getClosure on the MamaInbox instance

Parameters:

  • inbox The MamaInbox instance which received the message.
  • message The mamaMsg received in the p2p response.

function onError

void onError(
    MamaInbox inbox,
    MamaStatus.mamaStatus status
)

NB. Not currently used. Invoked when an error is encountered during p2p messaging. Note: you can obtain a reference to the user-supplied data passed to the create method by calling getClosure on the MamaInbox instance

Parameters:

  • inbox The MamaInbox instance for which the error occurred.
  • status The mama_status describing the error condition.

function onDestroy

void onDestroy(
    MamaInbox inbox,
    object closure
)

This method is invoked when an inbox has been completely destroyed, the client can have confidence that no further events will be placed on the queue for this inbox.

Parameters:

  • inbox The inbox.
  • closure The closure passed to the create function.

Updated on 2023-03-31 at 15:29:32 +0100