Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Analytics : Using the position service framework : Creating and using position service interfaces : Managing subscriptions : Obtaining subscription information
Obtaining subscription information
You can use the position service interface object to obtain information about subscriptions and position trackers. The following code extract provides examples of doing this.
action queryDemonstration() {
 
// Use the interface object to obtain information for all subscriptions:
dictionary<integer/*subscriptionId*/,
com.apama.position.SubscriptionDetails > subscriptions;
subscriptions := psIface.getAllSubscriptionDetails();
 
// Get the details for a specific subscription. You must specify
// the Id for the subscription. The Id is returned from a successful
// subscription request.
integer subscriptionId := 1;
com.apama.position.SubscriptionDetails details :=
psIface.getSubscriptionDetails( subscriptionId );
 
// Get the current position of a subscription:
com.apama.position.Position position :=
psInterface.getCurrentPosition( subscriptionId );
 
// Get details about a specific position tracker, and provide a
// boolean that indicates whether the asynchronous call should
// wait to respond if the position tracker has not yet been registered.
psIface.getTrackerInfo( "MyPositionTrackerName",
com.apama.position.tracker.OpenPositionTrackerConstants.TRACKER_TYPE,
true, cbTrackerDetails );
}
 
// This action is called when information about the position tracker
// is returned:
action cbTrackerDetails( com.apama.position.TrackerInfo trackerInfo ) {
log "TRACKER DETAILS: Name="+trackerInfo.name+" :
Type="+trackerInfo.type+" :
Context it was created in: "+trackerInfo.ctx.toString();
log "TRACKER CONFIG SCHEMA: "+trackerInfo.configSchema.toString();
}
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback