Server Smalltalk Guide
Invocation handlers and dispatchers also provide the following callbacks
related to significant invocation events.
- SstDispatchReplyCallback
- Sent when an invocation handler is about to dispatch a received reply to
its rightful receiver. The callData is the reply about to be
processed.
- SstDispatchRequestCallback
- Sent when an invocation handler is about to dispatch a received request to
its rightful receiver. The callData is the request about to
be processed.
- SstFirstIncomingCallback
- Sent when an invocation handler has received a request tagged with data
indicating that this is the first request the sender has sent to the receiving
object's space through the endpoint used. This data is typically
some information about the sending object space and is stored in the
request's info slots under the key
SstFirstContactInfoKey. The callData will contain
the request about to be processed.
- SstFirstOutgoingCallback
- Sent when an invocation handler has detected a request being sent to a
remote object space for the first time through the handler's
endpoint. A typical action would be to tag the outgoing request with
information about the local space in the request's
SstFirstContactInfoKey info slot. The callData
will contain the request about to be sent.
- SstSendReplyCallback
- Sent when an invocation handler is about to send a reply to a remote
space. The callData will contain a two-element array where
the first element is the reply being sent and the second is the original
request to which this is a reply.
- SstSendRequestCallback
- Sent when an invocation handler is about to send a request to a remote
space. The callData will contain a two-element array where
the first element is the request being sent and the second is the endpoint to
which it will be sent.
The ordering of callbacks associated with peer-to-peer messaging is
important to understand. The ordering is a consequence of the
interactions between the components of the invocation handler and the object
space. The object space callbacks involved are
SstExportCallback and SstImportCallback.
If a request message is sent involving newly exported objects to a peer for
which these objects are also new imports, and this message is the first
outgoing message from the sender and the first incoming message to the
receiver, the following callbacks are generated in order:
- At the request sender: SstFirstOutgoingCallback (once),
SstSendRequestCallback (once), SstExportCallback (for
each new export)
- At the request receiver: SstImportCallback (for each new
import), SstFirstIncomingCallback (once) and
SstDispatchRequestCallback (once).
If a reply is generated, which also involves new exports and imports, the
callback order is as follows:
- At the reply sender, SstSendReplyCallback (once),
SstExportCallback (for each new export)
- At the reply receiver, SstImportCallback (for each new import),
SstDispatchReplyCallback (once).
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]