com.apama.sor.strategy
Event StrategyInterface


The Strategy Interface allows the user to create and control a specific instance of a Strategy. The Strategy Interface is created from the call to create() on the StrategyHelperInterface object.

This interface allows the Strategy Helper to expose only those functions that are of direct use by the user, and masks those functions that are used internally by the Strategy Helper to provide the required functionality.
Since:
CMF 2.1.0

Member Summary
 action< > returns stringgetStrategyName

This function returns the name of this instance of the Strategy.
 action<string > returns com.apama.sor.oms.ParentOrderContainergetParentOrder

This function returns the Parent Order object using a given order identifier.
 action<com.apama.oms.NewOrder, action<string >, action<string, string > >create

This function creates a new Parent Order object for this Strategy instance using the order passed in, and calls the user back on either the success/failure callbacks provided.
 action<com.apama.oms.AmendOrder, string, action<string >, action<string, string > >amend

This function Amends an existing Parent Order object for this Strategy instance using the order passed in, and calls the user back on either the success/failure callbacks provided.
 action<com.apama.oms.CancelOrder, string, action<string >, action<string, string > >cancel

This function Cancels an existing Parent Order object for this Strategy instance using the order passed in, and calls the user back on either the success/failure callbacks provided.
 action<string, string, action<string, string >, action<string, string > >stopStrategy

This function terminates the an existing Parent Order instance using the orderId passed in and a reason for stopping the Strategy, and calls the user back on either the success/failure callbacks provided.
 
Member Detail

amend

action<com.apama.oms.AmendOrder, string, action<string >, action<string, string > > amend
This function Amends an existing Parent Order object for this Strategy instance using the order passed in, and calls the user back on either the success/failure callbacks provided.

Parameters:
amend - The AmemdOrder object that is needs to be handled by the Strategy
success - Callback action if the creation was successful.
failure - Callback action if the creation was unsuccessful.

cancel

action<com.apama.oms.CancelOrder, string, action<string >, action<string, string > > cancel
This function Cancels an existing Parent Order object for this Strategy instance using the order passed in, and calls the user back on either the success/failure callbacks provided.

Parameters:
newOrder - The CancelOrder object that is needs to be handled by the Strategy
success - Callback action if the creation was successful.
failure - Callback action if the creation was unsuccessful.

create

action<com.apama.oms.NewOrder, action<string >, action<string, string > > create
This function creates a new Parent Order object for this Strategy instance using the order passed in, and calls the user back on either the success/failure callbacks provided.

Parameters:
newOrder - The NewOrder object that is needs to be handled by the Strategy
success - Callback action if the creation was successful.
failure - Callback action if the creation was unsuccessful.

getParentOrder

action<string > returns com.apama.sor.oms.ParentOrderContainer getParentOrder
This function returns the Parent Order object using a given order identifier.

Parameters:
orderId - The identifier of the order to return the Parent Order object for


Returns:
The Parent Order object associated with the specified orderId

getStrategyName

action< > returns string getStrategyName
This function returns the name of this instance of the Strategy.

Returns:
The name of this instance of the Strategy

stopStrategy

action<string, string, action<string, string >, action<string, string > > stopStrategy
This function terminates the an existing Parent Order instance using the orderId passed in and a reason for stopping the Strategy, and calls the user back on either the success/failure callbacks provided.

Parameters:
newOrder - The CancelOrder object that is needs to be handled by the Strategy
success - Callback action if the creation was successful.
failure - Callback action if the creation was unsuccessful.