Apama 10.3 | Apama Capital Markets Foundation Documentation | Capital Markets Foundation | Analytics | Using the position service framework | Implementing custom position trackers
 
Implementing custom position trackers
 
Steps for implementing a custom position tracker
Actions custom trackers must implement
Registering custom position trackers
Actions custom trackers use to manage positions
Sample code for implementing a custom position tracker
For applications that have requirements that are not met by the default implementations of the position trackers, you can implement custom position trackers. The position service framework event interfaces you use to create a custom position tracker are defined in the com.apama.position.tracker package and described here:
*PSTrackerManagerInterface defines actions that a custom position tracker uses to update and publish positions it is tracking. There are also actions for providing information about the tracker instance and its subscriptions.
*PSTrackerFactory defines actions that a custom position tracker uses to register itself with the position service manager.
*PSTrackerInterface defines actions that every custom position tracker must implement.
A custom position tracker can publish a custom event instead of or in addition to the standard Position event. If a custom position tracker publishes the standard Position event, it can use the quantity and cash fields for any values needed to be stored. For example, you can use the minQtyPosition and minCashPosition fields to store a single net position, and ignore the maxQtyPosition and maxCashPosition fields. In fact, you can use the quantity and cash fields to store something else entirely. There are simply two integer and two float fields available to use.
To implement a custom position tracker, the Position Management Service bundle must be in your application.
For reference information, see the ApamaDoc.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.