com.apama.md.user
Event NewsManagerInterface


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

The News (News) Manager Interface event provides a high-level interface on to the News 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 5.0.2

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 News Manager Interface and create an instance of the News 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 News Manager Interface and create an instance of the News Manager.
 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 News Manager.
 action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.client.CurrentNewsInterface>> returns integeraddNewsStoriesCallback

Responds on every News add or update event associated with this interface.
 action<com.apama.md.adapter.ConnectionKey, integer> returns booleanremoveNewsStoriesCallback

Provides the user a mechanism to remove the on all News listeners.
 action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.client.CurrentNewsInterface>> returns integeraddNewsDeleteCallback

Responds on every News Delete event associated with this interface.
 action<com.apama.md.adapter.ConnectionKey, integer> returns booleanremoveNewsDeleteCallback

Provides the user a mechanism to remove the on all News Delete listeners.
 action<com.apama.md.adapter.ConnectionKey, action<dictionary<string, com.apama.md.NSI>>> returns integeraddSchemaUpdateCallback

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

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.CurrentNewsInterfacegetCurrentNews

Returns the current News 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

addNewsDeleteCallback

action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.client.CurrentNewsInterface>> returns integer addNewsDeleteCallback
Responds on every News Delete event associated with this interface.

The callback function returns a reference to the current News interface rather than the data itself. This means that if you store the returned CurrentNewsInterface reference and attempt to use it after a series of updates, the stored CurrentNewsInterface 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 a News is received.
See Also:
com.apama.md.user.NewsManager#addNewsDeleteCallback() - The implementation of the interface function.

addNewsStoriesCallback

action<com.apama.md.adapter.ConnectionKey, action<com.apama.md.client.CurrentNewsInterface>> returns integer addNewsStoriesCallback
Responds on every News add or update event associated with this interface.

The callback function returns a reference to the current News interface rather than the data itself. This means that if you store the returned CurrentNewsInterface reference and attempt to use it after a series of updates, the stored CurrentNewsInterface 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 a News is received.
Returns:
An integer reference ID which can be used to unregister the update callback.
See Also:
com.apama.md.user.NewsManager#addNewsStoriesCallback() - The implementation of the interface function.

addSchemaUpdateCallback

action<com.apama.md.adapter.ConnectionKey, action<dictionary<string, com.apama.md.NSI>>> returns integer addSchemaUpdateCallback
Responds on every News schema update associated with this interface.

The callback function returns a reference to the current News interface rather than the data itself. This means that if you store the returned CurrentNewsInterface reference and attempt to use it after a series of updates, the stored CurrentNewsInterface 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 a News Schema is received.
See Also:
com.apama.md.user.NewsManager#addSchemaUpdateCallback() - 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 News Manager Interface and create an instance of the News 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.NewsManager#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 News Manager Interface and create an instance of the News 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.NewsManager#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 News 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.NewsManager#disconnect() - The implementation of the interface function.

getConnectionList

action<> returns sequence<com.apama.md.adapter.ConnectionKeygetConnectionList
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.ConnectionKeygetConnectionListForSymbol
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.NewsManager#getCtrlParamSchema() - The implementation of the interface function.

getCurrentNews

action<com.apama.md.adapter.ConnectionKey> returns com.apama.md.client.CurrentNewsInterface getCurrentNews
Returns the current News interface for the specified symbol.

Parameters:
symbol - The name of the symbol to request the current data for.
Returns:
The current News interface.
See Also:
com.apama.md.user.NewsManager#getCurrentNews() - 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.

removeNewsDeleteCallback

action<com.apama.md.adapter.ConnectionKey, integer> returns boolean removeNewsDeleteCallback
Provides the user a mechanism to remove the on all News Delete 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 "addNewsDeleteCallback".
Returns:
true if successful, false otherwise.
See Also:
com.apama.md.user.NewsManager#removeNewsDeleteCallback() - The implementation of the interface function.

removeNewsStoriesCallback

action<com.apama.md.adapter.ConnectionKey, integer> returns boolean removeNewsStoriesCallback
Provides the user a mechanism to remove the on all News 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.NewsManager#removeNewsStoriesCallback() - The implementation of the interface function.

removeSchemaCallback

action<com.apama.md.adapter.ConnectionKey, integer> returns boolean removeSchemaCallback
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.NewsManager#removeSchemaCallback() - The implementation of the interface function.