com.apama.session
Event SessionManager


The Session Manager event is used to control and configure Sessions, and also allows applications to interrogate what sessions are currently available, and what they support.
Since:
CMF 2.0.1
Listens:
com.apama.session.LegacyMDToSession - 
com.apama.session.SessionControlError - 
com.apama.session.SessionControlSuccess - 

Member summary
 dictionary<integer, com.apama.session.SessionInfo>dictSessionInfo
 contextmainContext
 action<com.apama.session.SessionInfo>userAnySessionAddedCallback
 booleanregisteredAnySessionAddedCb
 dictionary<com.apama.session.SessionTransportKey, sequence<action<com.apama.session.SessionInfo>>>userSessionAddedCallback
 action<com.apama.session.SessionInfo>userAnySessionUpdatedCallback
 booleanregisteredAnySessionUpdatedCb
 dictionary<com.apama.session.SessionTransportKey, sequence<action<com.apama.session.SessionInfo>>>userSessionUpdatedCallback
 action<com.apama.session.SessionInfo>userAnySessionRemovedCallback
 booleanregisteredAnySessionRemovedCb
 dictionary<com.apama.session.SessionTransportKey, sequence<action<com.apama.session.SessionInfo>>>userSessionRemovedCallback
 com.apama.session.LegacySupportTablelegacySupportTable
 
Action summary
 voidcreateInterface(context mainContext, action<com.apama.session.SessionManagerInterface> success)

This function is called by the SessionManagerFactory to create a Session Manager Interface that can be used to control and configure Sessions, and also allow applications to interrogate what sessions are currently available, and what they support.
 voidderegisterAnySessionAddedCallback()

This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerAllSessionAddedCallback action.
 voidderegisterAnySessionRemovedCallback()

This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerAllSessionAddedCallback action.
 voidderegisterAnySessionUpdatedCallback()

This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerAllSessionAddedCallback action.
 voidderegisterSession(integer sessionId, action<integer> success, action<integer, string> failure)

This function deregisters a specified Session from the application.
 voidderegisterSessionUpdatedCallback(string sessionName, string transportName)

This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerSessionUpdatedCallback action.
 dictionary<integer, com.apama.session.SessionInfo>getAllSessionInfo()

This function is called by the user to get information on all the registered Sessions.
 com.apama.session.LegacyMDTuplegetLegacyKeyFromSessionInfo(string sessionName, string transportName)

This function is used to get the Legacy key information based on the sessionInfo object provided.
 com.apama.session.SessionInfogetSessionInfo(string sessionName, string transportName)

This function is called by the user to get the Session information based on the Session/Transport name.
 com.apama.session.SessionInfogetSessionInfoFromLegacyKey(string serviceId, string exchangeId, string marketId)
 com.apama.session.SessionInfogetSessionInfoFromSessionId(integer sessionId)

This function is called by the user to get the Session information based on the session ID passed in.
 booleanhasLegacyKey(string serviceId, string exchangeId, string marketId)
 booleanhasLegacySupport()
 booleanhasSessionId(integer sessionId)

This function is called by the user application to determine if a specific Session has been registered based on the SessionId that the Session was registered with.
 booleanhasSessionInfo(string sessionName, string transportName)

This function is called by the user application to determine if a specific Session has mapping to legacy market data keys.
 booleanhasSessionName(string sessionName, string transportName)

This function is called by the user application to determine if a specific Session has been registered based on the Session/Transport name.
 voidreconfigureSession(integer sessionId, com.apama.session.SessionConfigParams config, action<integer> success, action<integer, string> failure)

This function reconfigures a specified Session with new configuration parameters.
 voidregisterAnySessionAddedCallback(action<com.apama.session.SessionInfo> userCallback)

This function is called by the user to register a callback function that the Session Manager will call when any new Session has been added.
 voidregisterAnySessionRemovedCallback(action<com.apama.session.SessionInfo> userCallback)

This function is called by the user to register a callback function that the Session Manager will call when any new Session has been removed.
 voidregisterAnySessionUpdatedCallback(action<com.apama.session.SessionInfo> userCallback)

This function is called by the user to register a callback function that the Session Manager will call when any new Session has been updated.
 voidregisterSessionAddedCallback(string sessionName, string transportName, action<com.apama.session.SessionInfo> userCallback)

This function is called by the user to register a callback function that the Session Manager will call when a specific new Session has been added.
 voidregisterSessionRemovedCallback(string sessionName, string transportName, action<com.apama.session.SessionInfo> userCallback)

This function is called by the user to register a callback function that the Session Manager will call when a specific new Session has been removed.
 voidregisterSessionUpdatedCallback(string sessionName, string transportName, action<com.apama.session.SessionInfo> userCallback)

This function is called by the user to register a callback function that the Session Manager will call when a specific new Session has been updated.
 voidsetupListenersForLegacySupport()
 voidstartSession(integer sessionId, com.apama.session.SessionConfigParams config, action<integer> success, action<integer, string> failure)

This function starts a specified Session using the configuration specified.
 voidstopSession(integer sessionId, action<integer> success, action<integer, string> failure)

This function stops a specified Session.
 
Member detail

dictSessionInfo

            dictionary<integer, com.apama.session.SessionInfodictSessionInfo
        

legacySupportTable

            com.apama.session.LegacySupportTable legacySupportTable
        

mainContext

            context mainContext
        

registeredAnySessionAddedCb

            boolean registeredAnySessionAddedCb
        

registeredAnySessionRemovedCb

            boolean registeredAnySessionRemovedCb
        

registeredAnySessionUpdatedCb

            boolean registeredAnySessionUpdatedCb
        

userAnySessionAddedCallback

            action<com.apama.session.SessionInfouserAnySessionAddedCallback
        

userAnySessionRemovedCallback

            action<com.apama.session.SessionInfouserAnySessionRemovedCallback
        

userAnySessionUpdatedCallback

            action<com.apama.session.SessionInfouserAnySessionUpdatedCallback
        

userSessionAddedCallback

            dictionary<com.apama.session.SessionTransportKey, sequence<action<com.apama.session.SessionInfo>>> userSessionAddedCallback
        

userSessionRemovedCallback

            dictionary<com.apama.session.SessionTransportKey, sequence<action<com.apama.session.SessionInfo>>> userSessionRemovedCallback
        

userSessionUpdatedCallback

            dictionary<com.apama.session.SessionTransportKey, sequence<action<com.apama.session.SessionInfo>>> userSessionUpdatedCallback
        

Action detail

createInterface

            void createInterface(context mainContext, action<com.apama.session.SessionManagerInterface> success)
        
This function is called by the SessionManagerFactory to create a Session Manager Interface that can be used to control and configure Sessions, and also allow applications to interrogate what sessions are currently available, and what they support.
Parameters:
mainContext - The context that the SessionManagerService lives in (this should be the main context).
success - The action that will be called when the Interface has been created.
Since:
CMF 2.0.1

deregisterAnySessionAddedCallback

            void deregisterAnySessionAddedCallback()
        
This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerAllSessionAddedCallback action.
Since:
CMF 2.0.1
See Also:
registerAnySessionAddedCallback - The action that was used to register the callback.

deregisterAnySessionRemovedCallback

            void deregisterAnySessionRemovedCallback()
        
This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerAllSessionAddedCallback action.
Since:
CMF 2.0.1
See Also:
registerAnySessionRemovedCallback - The action that was used to register the callback.

deregisterAnySessionUpdatedCallback

            void deregisterAnySessionUpdatedCallback()
        
This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerAllSessionAddedCallback action.
Since:
CMF 2.0.1
See Also:
registerAnySessionUpdatedCallback - The action that was used to register the callback.

deregisterSession

            void deregisterSession(integer sessionId, action<integer> success, action<integer, string> failure)
        
This function deregisters a specified Session from the application.

This effectively removes and cleans up all information relating to the specified session from the Session Manager. If the Session was started, then an attempt to Stop the Session will be made first. Once the Session has been deregistered, the application would need to restart the Data Source if it wants to use that Session again.
Parameters:
sessionId - The session ID of the Session to deregister.
success - Callback action if the Session was stopped successfully.
failure - Callback action if the Session failed to stop.
Since:
CMF 2.0.1

deregisterSessionUpdatedCallback

            void deregisterSessionUpdatedCallback(string sessionName, string transportName)
        
This function is called by the user to deregister the callback function that they registered with the Session Manager using the registerSessionUpdatedCallback action.
Parameters:
sessionName
transportName
Since:
CMF 2.0.1
See Also:
registerSessionUpdatedCallback - The action that was used to register the callback.

getAllSessionInfo

            dictionary<integer, com.apama.session.SessionInfogetAllSessionInfo()
        
This function is called by the user to get information on all the registered Sessions.
Returns:
A dictionary containing the information for all registered sessions.
Since:
CMF 2.0.1

getLegacyKeyFromSessionInfo

            com.apama.session.LegacyMDTuple getLegacyKeyFromSessionInfo(string sessionName, string transportName)
        
This function is used to get the Legacy key information based on the sessionInfo object provided.
Parameters:
sessionName
transportName
Returns:
LegacyMDTuple Tuple event used to build a key for the LegacySupportTable.
See Also:
#LegacySupportTable - The event that holds the table to convert from legacy market data keys to new market data sessions.

getSessionInfo

            com.apama.session.SessionInfo getSessionInfo(string sessionName, string transportName)
        
This function is called by the user to get the Session information based on the Session/Transport name.
Parameters:
sessionName - The name of the Session to get session information for.
transportName - The name of the Sessions transport to get session information for.
Returns:
A SessionInfo object containing information about the matching Session. A returned SessionInfo object with a sessionId of "-1" indicates an error finding a matching Session.
Since:
CMF 2.0.1

getSessionInfoFromLegacyKey

            com.apama.session.SessionInfo getSessionInfoFromLegacyKey(string serviceId, string exchangeId, string marketId)
        
Parameters:
serviceId
exchangeId
marketId

getSessionInfoFromSessionId

            com.apama.session.SessionInfo getSessionInfoFromSessionId(integer sessionId)
        
This function is called by the user to get the Session information based on the session ID passed in.
Parameters:
sessionId - The session ID to get Session Information for.
Returns:
A SessionInfo object containing information about the matching Session. A returned SessionInfo object with a sessionId of "-1" indicates an error finding a matching Session.
Since:
CMF 2.0.1

hasLegacyKey

            boolean hasLegacyKey(string serviceId, string exchangeId, string marketId)
        
Parameters:
serviceId
exchangeId
marketId

hasLegacySupport

            boolean hasLegacySupport()
        

hasSessionId

            boolean hasSessionId(integer sessionId)
        
This function is called by the user application to determine if a specific Session has been registered based on the SessionId that the Session was registered with.
Parameters:
sessionId - The sessionId that the Session was registered with.
Returns:
true if successful, false otherwise.
Since:
CMF 2.0.1

hasSessionInfo

            boolean hasSessionInfo(string sessionName, string transportName)
        
This function is called by the user application to determine if a specific Session has mapping to legacy market data keys.
Parameters:
sessionName - The name of the Session.
transportName - The name of the Sessions transport.
Returns:
true if successful, false otherwise.

hasSessionName

            boolean hasSessionName(string sessionName, string transportName)
        
This function is called by the user application to determine if a specific Session has been registered based on the Session/Transport name.
Parameters:
sessionName - The name of the Session .
transportName - The name of the Sessions transport .
Returns:
true if successful, false otherwise.
Since:
CMF 2.0.1

reconfigureSession

            void reconfigureSession(integer sessionId, com.apama.session.SessionConfigParams config, action<integer> success, action<integer, string> failure)
        
This function reconfigures a specified Session with new configuration parameters.
Parameters:
sessionId - The session ID of the Session to reconfigure.
config - A new set of Session configuration parameters for this Session.
success - Callback action if the Session was reconfigured successfully.
failure - Callback action if the Session failed to be reconfigured.
Since:
CMF 2.0.1

registerAnySessionAddedCallback

            void registerAnySessionAddedCallback(action<com.apama.session.SessionInfo> userCallback)
        
This function is called by the user to register a callback function that the Session Manager will call when any new Session has been added.
Parameters:
userCallback - The user action that will be called when any new session has been added.
Since:
CMF 2.0.1
See Also:
deregisterAnySessionAddedCallback - The action that should be called to remove this callback.

registerAnySessionRemovedCallback

            void registerAnySessionRemovedCallback(action<com.apama.session.SessionInfo> userCallback)
        
This function is called by the user to register a callback function that the Session Manager will call when any new Session has been removed.
Parameters:
userCallback - The user action that will be called when any new session has been removed.
Since:
CMF 2.0.1
See Also:
deregisterAnySessionRemovedCallback - The action that should be called to remove this callback.

registerAnySessionUpdatedCallback

            void registerAnySessionUpdatedCallback(action<com.apama.session.SessionInfo> userCallback)
        
This function is called by the user to register a callback function that the Session Manager will call when any new Session has been updated.
Parameters:
userCallback - The user action that will be called when any new session has been updated.
Since:
CMF 2.0.1
See Also:
deregisterAnySessionUpdatedCallback - The action that should be called to remove this callback.

registerSessionAddedCallback

            void registerSessionAddedCallback(string sessionName, string transportName, action<com.apama.session.SessionInfo> userCallback)
        
This function is called by the user to register a callback function that the Session Manager will call when a specific new Session has been added.
Parameters:
sessionName - The name of a specific session that the user wants to be notified of when it is added.
transportName - The name of a specific transport that the user wants to be notified of when it is added.
userCallback - The user action that will be called when the specific new session has been added.
Since:
CMF 2.0.1

registerSessionRemovedCallback

            void registerSessionRemovedCallback(string sessionName, string transportName, action<com.apama.session.SessionInfo> userCallback)
        
This function is called by the user to register a callback function that the Session Manager will call when a specific new Session has been removed.
Parameters:
sessionName - The name of a specific session that the user wants to be notified of when it is removed.
transportName - The name of a specific transport that the user wants to be notified of when it is removed.
userCallback - The user action that will be called when the specific new session has been removed.
Since:
CMF 2.0.1

registerSessionUpdatedCallback

            void registerSessionUpdatedCallback(string sessionName, string transportName, action<com.apama.session.SessionInfo> userCallback)
        
This function is called by the user to register a callback function that the Session Manager will call when a specific new Session has been updated.
Parameters:
sessionName - The name of a specific session that the user wants to be notified of when it is updated.
transportName - The name of a specific transport that the user wants to be notified of when it is updated.
userCallback - The user action that will be called when the specific new session has been updated.
Since:
CMF 2.0.1
See Also:
deregisterSessionUpdatedCallback - The action that should be called to remove this callback.

setupListenersForLegacySupport

            void setupListenersForLegacySupport()
        
Listens:
com.apama.session.LegacyMDToSession - 

startSession

            void startSession(integer sessionId, com.apama.session.SessionConfigParams config, action<integer> success, action<integer, string> failure)
        
This function starts a specified Session using the configuration specified.
Parameters:
sessionId - The session ID of the Session to start.
config - A set of Session configuration parameters for this Session.
success - Callback action if the Session was started successfully.
failure - Callback action if the Session failed to start.
Since:
CMF 2.0.1

stopSession

            void stopSession(integer sessionId, action<integer> success, action<integer, string> failure)
        
This function stops a specified Session.
Parameters:
sessionId - The session ID of the Session to start.
success - Callback action if the Session was stopped successfully.
failure - Callback action if the Session failed to stop.
Since:
CMF 2.0.1