Apama 10.3 | Apama Capital Markets Foundation Documentation | Capital Markets Foundation | Session Management | Setting session callbacks
 
Setting session callbacks
 
Sample code for specifying callback when using handler to connect
Sample code for adding session connection callbacks
When your application successfully connects to a session one or more user-defined callbacks can optionally be invoked. There are several ways to invoke callbacks upon connection to a session:
*Execute SessionHandlerFactory.connectCb() and specify the callback that you want to invoke upon session connection.
*Execute SessionHandler.connectCb() and specify the callback that you want to invoke upon session connection. See Sample code for specifying callback when using handler to connect.
*Execute SessionHandler.addConnectedCallback() one or more times to specify one or more callbacks to be invoked upon subsequent calls to SessionHandler.connect(). See Sample code for adding session connection callbacks.
If you add one or more connected callbacks and then execute SessionHandler.connectCb(), this invokes the callback specified in the connectCb() action and ignores any callbacks you added with the addConnectedCallback() action. If you then call SessionHandler.connect(), the callbacks you previously added with addConnectedCallback() are used.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.