Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Analytics : Using the position service framework : Creating and using position service interfaces : Managing subscriptions
Managing subscriptions
 
Obtaining subscription information
The PSInterface object provides actions that let your application manage subscriptions:
*subscribeAndMonitor() - This action lets you subscribe to a position tracker and receive updates for the specified position. This is the functional equivalent of the subscribe() and the addUpdateCallback() actions. This action requires you to specify two callback actions. One callback action is executed when the subscription request is successful. The other callback action is executed when there is a position update.
By default, this action waits until the tracker is registered and available, or until a configurable timeout duration has expired. Or, you can configure this action to return immediately if the specified position tracker has not been created. For additional information, see the ApamaDoc for com.apama.position.Constants, which defines the constants that indicate the timeout duration and whether to return immediately. The default timeout duration is five seconds.
*subscribe() - This action lets you subscribe to a position tracker. You must specify a callback action to be executed when the subscription request is successful.
By default, this action waits until the tracker is registered and available, or until a configurable timeout duration has expired. Or, you can configure this action to return immediately if the specified position tracker has not been created. For additional information, see the ApamaDoc for com.apama.position.Constants, which defines the constants that indicate the timeout duration and whether to return immediately. The default timeout duration is five seconds.
*unsubscribe() - This action sends a request to unsubscribe from an existing subscription held by the position service manager. You must specify a callback action to be executed when the unsubscription request is successful.
*getAllSubscriptionDetails() - This action allows applications to query all subscriptions made by this position service interface.
*getSubscriptionDetails() – This helper action allows applications to retrieve details for a subscription that has been made by this position service interface for the specified subscriptionId.
Code that provides an example of subscribing to a default position tracker is in Creating and subscribing to the open position tracker.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback