com.apama.md.user
Event NewsManager


The News Manager event is used for simplifying the use of the Market data interface for handling the News (News) data stream information.
Since:
CMF 5.0.2

Action summary
 integeraddNewsDeleteCallback(com.apama.md.adapter.ConnectionKey connKey, action<com.apama.md.client.CurrentNewsInterface> userOnAllNewsDelete)

This function is called by the user to register an update callback function for a news delete events for a specific symbol.
 integeraddNewsStoriesCallback(com.apama.md.adapter.ConnectionKey connKey, action<com.apama.md.client.CurrentNewsInterface> userOnAllNews)

This function is called by the user to register an update callback function for a specific symbol.
 integeraddSchemaUpdateCallback(com.apama.md.adapter.ConnectionKey connKey, action<dictionary<string, com.apama.md.NSI>> userOnAllNewsSchema)

This function is called by the user to register an update callback function for the news schema.
 voidconnect(string symbol, com.apama.session.CtrlParams controlParams, action<com.apama.session.SessionError> userOnSessionError, action<com.apama.md.adapter.ConnectionKey> userOnConnectSuccess, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error> userOnConnectFailure)

This function is called by the user to connect to a previously created data stream interface for a specific symbol.
 voidconnectWithoutCache(string symbol, com.apama.session.CtrlParams controlParams, action<com.apama.session.SessionError> userOnSessionError, action<com.apama.md.adapter.ConnectionKey> userOnConnectSuccess, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error> userOnConnectFailure)

This function is called by the user to connect to a previously created data stream interface for a specific symbol.
 voiddisconnect(com.apama.md.adapter.ConnectionKey connKey, action<com.apama.md.adapter.ConnectionKey> success, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error> failure)

This function is called by the user to disconnect a specific symbol from the data stream.
 sequence<com.apama.md.adapter.ConnectionKey>getConnectionList()

Helper function to return a sequence of the current connection keys.
 sequence<com.apama.md.adapter.ConnectionKey>getConnectionListForSymbol(string symbol)

Helper function to return a sequence of the potential connection keys for any connections with a specified symbol name.
 com.apama.session.CtrlParamsSchemagetCtrlParamSchema()

Helper function to provide access to the control parameters for this data stream.
 com.apama.md.client.CurrentNewsInterfacegetCurrentNews(com.apama.md.adapter.ConnectionKey connKey)

Helper function to return the current News interface.
 booleanhasData(com.apama.md.adapter.ConnectionKey connKey)

Helper function to determine whether any data has been received yet.
 booleanremoveNewsDeleteCallback(com.apama.md.adapter.ConnectionKey connKey, integer reference)

This function is called by the user to remove an update callback for News Delete based on the reference that was returned when it was added.
 booleanremoveNewsStoriesCallback(com.apama.md.adapter.ConnectionKey connKey, integer reference)

This function is called by the user to remove an update callback based on the reference that was returned when it was added.
 booleanremoveSchemaCallback(com.apama.md.adapter.ConnectionKey connKey, integer reference)

This function is called by the user to remove a schema update callback based on the reference that was returned when it was added.
 
Action detail

addNewsDeleteCallback

integer addNewsDeleteCallback(com.apama.md.adapter.ConnectionKey connKey, action<com.apama.md.client.CurrentNewsInterface> userOnAllNewsDelete)
This function is called by the user to register an update callback function for a news delete events for a specific symbol.

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 to register the update callback for.
userOnAllNewsDelete - A callback action called when new News Delete events are received.
Returns:
An integer reference ID which can be used to unregister the update callback.
Since:
CMF 5.0.2
See Also:
com.apama.md.user.NewsManager#removeNewsDeleteCallback() - This function should be called to remove the update handler given the reference Id returned from this function.

addNewsStoriesCallback

integer addNewsStoriesCallback(com.apama.md.adapter.ConnectionKey connKey, action<com.apama.md.client.CurrentNewsInterface> userOnAllNews)
This function is called by the user to register an update callback function for a specific symbol.

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 to register the update callback for.
userOnAllNews - A callback action called when new News updates are received.
Returns:
An integer reference ID which can be used to unregister the update callback.
Since:
CMF 5.0.2
See Also:
com.apama.md.user.NewsManager#removeNewsStoriesCallback() - This function should be called to remove the update handler given the reference Id returned from this function.

addSchemaUpdateCallback

integer addSchemaUpdateCallback(com.apama.md.adapter.ConnectionKey connKey, action<dictionary<string, com.apama.md.NSI>> userOnAllNewsSchema)
This function is called by the user to register an update callback function for the news schema.

The callback function returns a reference to the current dictionary schema rather than the data itself. This means that if you store the returned dictionary reference and attempt to use it after a series of updates, the stored dictionary will refer to the last update.
Parameters:
connKey - The unique key for the connection to the datastream to register the update callback for.
userOnAllNewsSchema - A callback action called when new News Schema updates are received.
Returns:
An integer reference ID which can be used to unregister the schema update callback.
Since:
CMF 5.0.2
See Also:
#removeNewsSchemaCallback - This function should be called to remove the schema update handler given the reference Id returned from this function.

connect

void connect(string symbol, com.apama.session.CtrlParams controlParams, action<com.apama.session.SessionError> userOnSessionError, action<com.apama.md.adapter.ConnectionKey> userOnConnectSuccess, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error> userOnConnectFailure)
This function is called by the user to connect to a previously created data stream interface for a specific symbol.
Parameters:
symbol - The symbol to connect to.
controlParams - Control parameters (if required).
userOnSessionError - Callback action for session errors.
userOnConnectSuccess - A callback action on successful connection to the datastream.
userOnConnectFailure - A callback action on failure to connect to the datastream.
Since:
CMF 5.0.2

connectWithoutCache

void connectWithoutCache(string symbol, com.apama.session.CtrlParams controlParams, action<com.apama.session.SessionError> userOnSessionError, action<com.apama.md.adapter.ConnectionKey> userOnConnectSuccess, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error> userOnConnectFailure)
This function is called by the user to connect to a previously created data stream interface for a specific symbol.
Parameters:
symbol - The symbol to connect to.
controlParams - Control parameters (if required).
userOnSessionError - Callback action for session errors.
userOnConnectSuccess - A callback action on successful connection to the datastream.
userOnConnectFailure - A callback action on failure to connect to the datastream.
Since:
CMF 5.0.2

disconnect

void disconnect(com.apama.md.adapter.ConnectionKey connKey, action<com.apama.md.adapter.ConnectionKey> success, action<com.apama.md.adapter.ConnectionKeycom.apama.md.client.Error> failure)
This function is called by the user to disconnect a specific symbol from the data stream.
Parameters:
connKey - The unique key for the connection to the datastream that we want to disconnect.
success - A callback action on successful disconnection from the datastream.
failure - A callback action on failure to disconnect from to the datastream.
Since:
CMF 5.0.2

getConnectionList

sequence<com.apama.md.adapter.ConnectionKeygetConnectionList()
Helper function to return a sequence of the current connection keys.
Returns:
A sequence of the current connection keys.
Since:
CMF 5.0.2

getConnectionListForSymbol

sequence<com.apama.md.adapter.ConnectionKeygetConnectionListForSymbol(string symbol)
Helper function to return a sequence of the potential connection keys for any connections with a specified symbol name.
Parameters:
symbol - The symbol to get the connection list for.
Returns:
A sequence of the potential connection keys for any connections with a specified symbol name.
Since:
CMF 5.0.2

getCtrlParamSchema

com.apama.session.CtrlParamsSchema getCtrlParamSchema()
Helper function to provide access to the control parameters for this data stream.
Returns:
Event for the News datastream.
Since:
CMF 5.0.2

getCurrentNews

com.apama.md.client.CurrentNewsInterface getCurrentNews(com.apama.md.adapter.ConnectionKey connKey)
Helper function to return the current News interface.
Parameters:
connKey - The unique key for the connection to the datastream to request the current data for.
Returns:
The current News interface for the requested connection.
Since:
CMF 5.0.2

hasData

boolean hasData(com.apama.md.adapter.ConnectionKey connKey)
Helper function to determine whether any data has been received yet.
Parameters:
connKey - The unique key for the connection to the datastream to check data exists for.
Returns:
true if data is available, false otherwise.
Since:
CMF 5.0.2

removeNewsDeleteCallback

boolean removeNewsDeleteCallback(com.apama.md.adapter.ConnectionKey connKey, integer reference)
This function is called by the user to remove an update callback for News Delete based on the reference that was returned when it was added.
Parameters:
connKey - The unique key for the connection to the datastream to remove the update callback for.
reference - The Reference ID returned from addNewsDeleteCallback.
Returns:
true if successful, false otherwise.
Since:
CMF 5.0.2
See Also:
com.apama.md.user.NewsManager#addNewsDeleteCallback() - The function that provides the reference Id.

removeNewsStoriesCallback

boolean removeNewsStoriesCallback(com.apama.md.adapter.ConnectionKey connKey, integer reference)
This function is called by the user to remove an update callback based on the reference that was returned when it was added.
Parameters:
connKey - The unique key for the connection to the datastream to remove the update callback for .
reference - The Reference ID returned from addNewsUpdateCallback.
Returns:
true if successful, false otherwise.
Since:
CMF 5.0.2
See Also:
#addNewsUpdateCallback - The function that provides the reference Id.

removeSchemaCallback

boolean removeSchemaCallback(com.apama.md.adapter.ConnectionKey connKey, integer reference)
This function is called by the user to remove a schema update callback based on the reference that was returned when it was added.
Parameters:
connKey - The unique key for the connection to the datastream to remove the update callback for.
reference - The Reference ID returned from addNewsSchemaUpdateCallback.
Returns:
true if successful, false otherwise.
Since:
CMF 5.0.2
See Also:
#addNewsSchemaUpdateCallback - The function that provides the reference Id.