com.apama.md.user
Event OrderbookManagerInterface


The Orderbook Manager Interface allows the user to connect to and control the Orderbook (or Market by Order) datastream provided by the Source that was provided when the interface was created using the MDManagerFactory.

The Orderbook Manager Interface event provides a high-level interface on to the Orderbook Manager class. This interface allows the Manager to expose only those functions that are of direct use by the user, and masks those functions that are used internally by the Manager to provide the required functionality.
Since:
CMF 2.0.0

Member Summary
 action<string, com.apama.session.CtrlParams, action<com.apama.session.SessionError >, action<com.apama.md.adapter.ConnectionKey >, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error > >connect

Connect to the Orderbook Manager Interface and create an instance of the Orderbook Manager.
 action<string, com.apama.session.CtrlParams, action<com.apama.session.SessionError >, action<com.apama.md.adapter.ConnectionKey >, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error > >connectWithoutCache

Connect to the Orderbook Manager Interface and create an instance of the Orderbook Manager, without caching data.
 action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.adapter.ConnectionKey >, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error > >disconnect

Disconnect from the Orderbook Manager.
 action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.client.CurrentOrderbookInterface > > returns integeraddUpdateCallback

Responds on every Orderbook update associated with this interface.
 action<com.apama.md.adapter.ConnectionKey, integer > returns booleanremoveCallback

Provides the user a mechanism to remove the on all listeners.
 action< > returns com.apama.session.CtrlParamsSchemagetCtrlParamSchema

Provides the user a mechanism to access the control parameters that are returned from the data stream creation.
 action<com.apama.md.adapter.ConnectionKey > returns booleanhasData

This function allows the Manager object to determine whether any data has been received for this connection.
 action<com.apama.md.adapter.ConnectionKey > returns com.apama.md.client.CurrentOrderbookInterfacegetCurrentOrderbook

Returns the current Orderbook interface for the specified symbol.
 action< > returns sequence<com.apama.md.adapter.ConnectionKey >getConnectionList

Returns a sequence of the current connection keys.
 action<string > returns sequence<com.apama.md.adapter.ConnectionKey >getConnectionListForSymbol

Returns a sequence of the potential connection keys for any connections with a specified symbol name.
 
Member Detail

addUpdateCallback

action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.client.CurrentOrderbookInterface > > returns integer addUpdateCallback
Responds on every Orderbook update associated with this interface.

The callback function returns a reference to the current Orderbook interface rather than the data itself. This means that if you store the returned CurrentOrderbookInterface reference and attempt to use it after a series of updates, the stored CurrentOrderbookInterface will refer to the last update.

Parameters:
connKey - The unique key for the connection to the datastream for which to add an update handler.
success - The action called each time an Orderbook is received.
Returns:
An integer reference ID which can be used to unregister the update callback.
See Also:
com.apama.md.user.OrderbookManager#addOrderbookUpdateCallback() - The implementation of the interface function.

connect

action<string, com.apama.session.CtrlParams, action<com.apama.session.SessionError >, action<com.apama.md.adapter.ConnectionKey >, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error > > connect
Connect to the Orderbook Manager Interface and create an instance of the Orderbook Manager.

Parameters:
symbol - The name of the symbol to create a connection for.
controlParams - Any control parameters that are required for this connection.
userOnSessionError - Callback action for session errors.
success - Callback action if the connection was successful.
failure - Callback action if the connection was unsuccessful.
See Also:
com.apama.md.user.OrderbookManager#connect() - The implementation of the interface function.

connectWithoutCache

action<string, com.apama.session.CtrlParams, action<com.apama.session.SessionError >, action<com.apama.md.adapter.ConnectionKey >, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error > > connectWithoutCache
Connect to the Orderbook Manager Interface and create an instance of the Orderbook Manager, without caching data.

Parameters:
symbol - The name of the symbol to create a connection for.
controlParams - Any control parameters that are required for this connection.
userOnSessionError - Callback action for session errors.
success - Callback action if the connection was successful.
failure - Callback action if the connection was unsuccessful.
See Also:
com.apama.md.user.OrderbookManager#connectWithoutCache() - The implementation of the interface function.

disconnect

action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.adapter.ConnectionKey >, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error > > disconnect
Disconnect from the Orderbook Manager.

Parameters:
connKey - The unique key for the connection to the datastream for which to disconnect from.
success - Callback action if the disconnection was successful.
failure - Callback action if the disconnection was unsuccessful.
See Also:
com.apama.md.user.OrderbookManager#disconnect() - The implementation of the interface function.

getConnectionList

action< > returns sequence<com.apama.md.adapter.ConnectionKey > getConnectionList
Returns a sequence of the current connection keys.

Returns:
A sequence of the current connection keys.

getConnectionListForSymbol

action<string > returns sequence<com.apama.md.adapter.ConnectionKey > getConnectionListForSymbol
Returns a sequence of the potential connection keys for any connections with a specified symbol name.

Returns:
A sequence of the potential connection keys for any connections with a specified symbol name.

getCtrlParamSchema

action< > returns com.apama.session.CtrlParamsSchema getCtrlParamSchema
Provides the user a mechanism to access the control parameters that are returned from the data stream creation.

Returns:
The Control parameters associated with this connection.
See Also:
com.apama.md.user.OrderbookManager#getCtrlParamSchema() - The implementation of the interface function.

getCurrentOrderbook

action<com.apama.md.adapter.ConnectionKey > returns com.apama.md.client.CurrentOrderbookInterface getCurrentOrderbook
Returns the current Orderbook interface for the specified symbol.

Parameters:
symbol - The name of the symbol to request the current data for.
Returns:
The current Orderbook interface.
See Also:
com.apama.md.user.OrderbookManager#getCurrentOrderbook() - The implementation of the interface function.

hasData

action<com.apama.md.adapter.ConnectionKey > returns boolean hasData
This function allows the Manager object to determine whether any data has been received for this connection.

Parameters:
connKey - The unique key for the connection to the datastream for which to request the current data.
Returns:
true if data is available, false otherwise.

removeCallback

action<com.apama.md.adapter.ConnectionKey, integer > returns boolean removeCallback
Provides the user a mechanism to remove the on all listeners.

Parameters:
connKey - The unique key for the connection to the datastream for which to remove an update handler.
reference - The reference ID as returned from the call to "addUpdateCallback".
Returns:
true if successful, false otherwise.
See Also:
com.apama.md.user.OrderbookManager#removeOrderbookCallback() - The implementation of the interface function.