Apama Capital Markets Foundation 10.1 Documentation : Capital Markets Foundation : Market Data Management : Synthetic datasources : Foreign Exchange cross rate service : Creating an instance of the cross rate service
Creating an instance of the cross rate service
The following code excerpt shows how to create an instance of the synthetic Cross Rate Service using two underlying Sessions (1 and 2):
action createCrossRateService() {
// Get the SessionInfo for the two underlying Sessions we want to use
// In this case, SessionId 1 and 2
sequence<com.apama.session.SessionInfo> sources := new
sequence<com.apama.session.SessionInfo>;
sources.append( sessionManagerIface.getSessionInfo( 1 );
sources.append( sessionManagerIface.getSessionInfo( 2 );

// Now create the Cross Rate Service
com.apama.md.adapter.CrossRateServiceSession crossRateService := new
com.apama.md.adapter.CrossRateServiceSession;
crossRateService.create( mainContext, "MyCrossRateSession", sources,
new sequence<com.apama.session.SessionConfigParams>,
xrateCreationSuccess, xrateCreationFailure );
}
Copyright © 2013-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback