Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Session Management : Connecting to sessions : Sample code for using factory to connect
Sample code for using factory to connect
The simplest way to connect to a session is to execute com.apama.session.SessionHandlerFactory.connect(). This action uses the session ID and transport ID that you specify, as well as a reference to the main context, to create a session and connect to that session. For example:
monitor SessionExample1 {
 
context mainContext := context.current();
 
action onload() {
com.apama.session.SessionHandler sessionHandler :=
(new com.apama.session.SessionHandlerFactory).connect(
mainContext, "MySession", "MyTransport");
}
...
}
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback