com.apama.position
Event PSInterface


This is the main application level interface to the Position Service. This is primarily used to manage subscriptions, alter position values of existing subscriptions, and it also provides interface actions to query the state of the Position Service.

This interface is created by the Position Service Factory object (com.apama.position.PSFactory), and should not be created directly by applications.
See Also:
com.apama.position.PSFactory - The user-level interface that is used to create an instance of the Position Service Interface

Member summary
 action<string, string, com.apama.position.PositionConfigParams, action<integer, com.apama.position.SubscriptionDetails, boolean, string>>subscribe

This action makes a subscription request to the Position Service Manager for the Position Tracker defined, using the provided configuration details.
 action<string, string, com.apama.position.PositionConfigParams, action<integer, com.apama.position.Position>, action<integer, com.apama.position.SubscriptionDetails, integer, boolean, string>>subscribeAndMonitor

This action makes a subscription request to the Position Service Manager for the Position Tracker defined, using the provided configuration details.
 action<integer, action<integer, boolean, string>>unsubscribe

This action requests to unsubscribe an existing subscription using the subscription Id that was originally returned.
 action<> returns integergetSubMgrId

This action returns the Position Service Interface Id of the current interface. This ID uniquely identifies an instance of the Position Service Interface.
 action<integer> returns com.apama.position.SubscriptionDetailsgetSubscriptionDetails

This action returns details of the subscription given a specified Subscription ID.
 action<> returns dictionary<integer, com.apama.position.SubscriptionDetails>getAllSubscriptionDetails

This action returns details of the all the subscription made from this instance of the Position Service Interface.
 action<string, string, boolean, action<com.apama.position.TrackerInfo>>getTrackerInfo

This action returns information on a requested tracker.
 action<integer, action<integer, com.apama.position.Position>> returns integeraddUpdateCallback

This action registers an action that will be called when the position of a specified subscription is updated.
 action<integer, string, action<integer, string, com.apama.position.Position>> returns integeraddSymbolSliceUpdateCallback

This action registers an action that will be called when the position of a specified symbol slice within a subscription is updated.
 action<integer> returns booleanremoveUpdateCallback

This action removes an update callback for the reference ID provided.
 action<integer> returns com.apama.position.PositiongetCurrentPosition

This action returns the current Position of a specified subscription.
 action<integer, com.apama.position.Position, action<integer, com.apama.position.Position, boolean, string>>setPosition

This action sets the absolute position for the specified Subscription ID in the tracker.
 action<integer, com.apama.position.Positioncom.apama.position.PositionConfigParams, action<integer, com.apama.position.Position, boolean, string>>setPositionWithConfig

This action sets the absolute position for the specified Subscription ID in the tracker with a set of extra configuration parameters that will be passed to the Position Tracker to be used for the adjustment.
 action<integer, com.apama.position.Position, action<integer, com.apama.position.Position, boolean, string>>adjustRelativePosition

This action adjusts the relative position for the specified Subscription ID in the tracker.
 action<integer, com.apama.position.Positioncom.apama.position.PositionConfigParams, action<integer, com.apama.position.Position, boolean, string>>adjustRelativePositionWithConfig

This action adjusts the relative position for the specified Subscription ID in the tracker with a set of extra configuration parameters that will be passed to the Position Tracker to be used for the adjustment.
 action<integer, action<integer, com.apama.position.Position, boolean, string>>resetPosition

This action resets position for the specified Subscription ID in the tracker.
 action<action<integer, boolean, string>>deleteInterface

This action deletes the existing Position Service Interface, and cleans up any existing state information held by this interface.
 
Member detail

addSymbolSliceUpdateCallback

            action<integer, string, action<integer, string, com.apama.position.Position>> returns integer addSymbolSliceUpdateCallback
        
This action registers an action that will be called when the position of a specified symbol slice within a subscription is updated.

A unique reference ID is returned that allows user to remove this update callback at a later date using the com.apama.position.PSInterface.removeUpdateCallback() action.


param subscriptionId The subscription ID to add a callback update for
param symbolSlice The symbol slice the subscription is for
param positionChangedCb The callback action that will be called when the position is updated


return An integer reference ID for this registration request, that can be used to remove the callback when it is no longer required

addUpdateCallback

            action<integer, action<integer, com.apama.position.Position>> returns integer addUpdateCallback
        
This action registers an action that will be called when the position of a specified subscription is updated.

A unique reference ID is returned that allows user to remove this update callback at a later date using the com.apama.position.PSInterface.removeUpdateCallback() action.


param subscriptionId The subscription ID to add a callback update for
param positionChangedCb The callback action that will be called when the position is updated


return An integer reference ID for this registration request, that can be used to remove the callback when it is no longer required

adjustRelativePosition

            action<integer, com.apama.position.Position, action<integer, com.apama.position.Position, boolean, string>> adjustRelativePosition
        
This action adjusts the relative position for the specified Subscription ID in the tracker.

As this action is asynchronous, a callback action must be provided which will be called to indicate when the adjustment has been made or an error has occurred.


param subscriptionId The subscription ID to get the subscription details for
param newPosition The new position to adjust the position by.
param cbAdjusted A user-defined callback that will be called when the adjustment has been made

adjustRelativePositionWithConfig

            action<integer, com.apama.position.Positioncom.apama.position.PositionConfigParams, action<integer, com.apama.position.Position, boolean, string>> adjustRelativePositionWithConfig
        
This action adjusts the relative position for the specified Subscription ID in the tracker with a set of extra configuration parameters that will be passed to the Position Tracker to be used for the adjustment.

This set of configuration parameters is specific to the Position Tracker implementation. As this action is asynchronous, a callback action must be provided which will be called to indicate when the adjustment has been made or an error has occurred.


param subscriptionId The subscription ID to get the subscription details for
param newPosition The new position to adjust the position by.
param config Any extra configuration that may be required by a specific Position Tracker for the adjustment
param cbAdjusted A user-defined callback that will be called when the adjustment has been made

deleteInterface

            action<action<integer, boolean, string>> deleteInterface
        
This action deletes the existing Position Service Interface, and cleans up any existing state information held by this interface.

The user provides an action that will be called back on response to the delete request (IE whether it was successful or not).


param cbDeleted This callback that will be called on response to this request

getAllSubscriptionDetails

            action<> returns dictionary<integer, com.apama.position.SubscriptionDetailsgetAllSubscriptionDetails
        
This action returns details of the all the subscription made from this instance of the Position Service Interface.


return A dictionary containing details of all the subscriptions made by the current Position Service Interface, using the Subscription ID as the key.

getCurrentPosition

            action<integer> returns com.apama.position.Position getCurrentPosition
        
This action returns the current Position of a specified subscription.


param subscriptionId The subscription ID to get the position for
return The current cached position of the specified subscription

getSubMgrId

            action<> returns integer getSubMgrId
        
This action returns the Position Service Interface Id of the current interface. This ID uniquely identifies an instance of the Position Service Interface.


return subMgrId The Position Service Interface Id of the current interface

getSubscriptionDetails

            action<integer> returns com.apama.position.SubscriptionDetails getSubscriptionDetails
        
This action returns details of the subscription given a specified Subscription ID.


param subscriptionId The subscription ID to get the subscription details for
return The subscription details for the specified subscription ID

getTrackerInfo

            action<string, string, boolean, action<com.apama.position.TrackerInfo>> getTrackerInfo
        
This action returns information on a requested tracker.

If not already registered, it can wait until the tracker is registered if the waitForRegistration parameter is set to tt>true. Otherwise the TrackerInfo object provided will have the registered parameter set to false if it cannot be found.


param trackerName The name of the tracker to get info on.
param trackerType The type of the tracker to get info on.
param waitForRegistration If not already registered, wait for this tracker to be registered.
param registeredCb The callback to supply the tracker information to.

removeUpdateCallback

            action<integer> returns boolean removeUpdateCallback
        
This action removes an update callback for the reference ID provided.

This ID would have been returned from the original call to com.apama.position.PSInterface.addUpdateCallback().


param updateRefId The reference ID of the update callback handler to be removed
return True if successful, False otherwise

resetPosition

            action<integer, action<integer, com.apama.position.Position, boolean, string>> resetPosition
        
This action resets position for the specified Subscription ID in the tracker.

As this action is asynchronous, a callback action must be provided which will be called to indicate when the adjustment has been made or an error has occurred.


param subscriptionId The subscription ID to get the subscription details for
param cbReset A user-defined callback that will be called when the adjustment has been made

setPosition

            action<integer, com.apama.position.Position, action<integer, com.apama.position.Position, boolean, string>> setPosition
        
This action sets the absolute position for the specified Subscription ID in the tracker.

As this action is asynchronous, a callback action must be provided which will be called to indicate when the position has been set or an error has occurred.


param subscriptionId The subscription ID to get the subscription details for
param newPosition The new absolute position to set the position to.
param cbAdjusted A user-defined callback that will be called when the adjustment has been made

setPositionWithConfig

            action<integer, com.apama.position.Positioncom.apama.position.PositionConfigParams, action<integer, com.apama.position.Position, boolean, string>> setPositionWithConfig
        
This action sets the absolute position for the specified Subscription ID in the tracker with a set of extra configuration parameters that will be passed to the Position Tracker to be used for the adjustment.

This set of configuration parameters is specific to the Position Tracker implementation. As this action is asynchronous, a callback action must be provided which will be called to indicate when the position has been set or an error has occurred.


param subscriptionId The subscription ID to get the subscription details for
param newPosition The new absolute position to set the position to.
param config Any extra configuration that may be required by a specific Position Tracker for the adjustment
param cbAdjusted A user-defined callback that will be called when the adjustment has been made

subscribe

            action<string, string, com.apama.position.PositionConfigParams, action<integer, com.apama.position.SubscriptionDetails, boolean, string>> subscribe
        
This action makes a subscription request to the Position Service Manager for the Position Tracker defined, using the provided configuration details.

The user provides an action that will be called back with the subscription response (IE whether it was successful or not, and details of the subscription).


param trackerName The name of the Position Tracker that was subscribed to
param trackerType The type of the Position Tracker that was subscribed to
param config A PositionConfigParams object containing any Subscription Manager wide configuration
param subscribedCb The user-defined callback action that will be called in response to the subscription request

subscribeAndMonitor

            action<string, string, com.apama.position.PositionConfigParams, action<integer, com.apama.position.Position>, action<integer, com.apama.position.SubscriptionDetails, integer, boolean, string>> subscribeAndMonitor
        
This action makes a subscription request to the Position Service Manager for the Position Tracker defined, using the provided configuration details.

If the subscription was successful, an update callback will also be added that will be called when the subscriptions position is updated. The user also provides an action that will be called back with the subscription response (IE whether it was successful or not, and details of the subscription).


param trackerName The name of the Position Tracker that was subscribed to
param trackerType The type of the Position Tracker that was subscribed to
param config A PositionConfigParams object containing any Subscription Manager wide configuration
param updateCallback The user-defined update callback action that will be called when a subscriptions position is updated
param subscribedCb The user-defined callback action that will be called in response to the subscription request

unsubscribe

            action<integer, action<integer, boolean, string>> unsubscribe
        
This action requests to unsubscribe an existing subscription using the subscription Id that was originally returned.

The user provides an action that will be called back with the unsubscribe response (IE whether it was successful or not.


param subscriptionId The ID of the subscription you want to unsubscribe from. This is provided when you initially subscribe, but can also be returned from querying the Position Manager Interface
param unsubscribedCb The user-defined callback action that will be called in response to the request to unsubscribe