Event callbacks (connect/disconnect)
Description
The Distributed feature provides a set of callbacks that you can use to keep track of the local object space's connections to other object spaces. These callbacks include the following:
•dsObjectSpaceConnectCallback
•dsObjectSpaceDisconnectCallback
•dsObjectSpaceDisconnectOnExitingCallback
•dsObjectSpaceDisconnectOnStartCallback
SST equivalent
SST provides callbacks from several of its components. The transport component, when used with connection oriented transports, provides the following callbacks for connect and disconnect:
•SstConnectCallback
•SstDisconnectCallback
Porting guidelines
For SST connective transports, such as TCP, the Distributed feature callbacks can be approximated with the SstConnectCallback and SstDisconnectCallback callbacks from the SST transport component.
You need to be aware that the SST callbacks are not an exact replacement for the Distributed feature callbacks. The Distributed feature callbacks are at the object space level and use object spaces as their callData. On the other hand, the SST callbacks are at the transport level and use endpoints as their callData.
Further, the Distributed feature identifies three distinct disconnect callbacks, based on when an object space disconnect occurs. If SST users need the same distinction, they will need to determine the reason for the disconnect as part of their callback processing.
Below is example code showing how to register for a SstDisconnectCallback:
transport configuration callbacks
addCallback: SstDisconnectCallback
receiver: myConnectionManager
selector: #processDisconnectCallback:clientData:callData:
clientData: myClientData
Last modified date: 07/02/2019