Apama Capital Markets Foundation  10.7.0.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
AP_SESSION_AdapterInterface Struct Reference

#include <SM_SessionInterface.h>

Public Attributes

void(* onCorrelatorWatchDogTimedOut )(void *transportInternals)
 
void(* onSessionRegistrationSuccess )(void *transportInternals, const char *sessionName, AP_int64 sourceId, AP_TimestampSet *tss)
 
void(* onSessionRegistrationError )(void *transportInternals, const char *sessionName, AP_TimestampSet *tss)
 
void(* onSessionStart )(void *transportInternals, AP_int64 sourceId, HashMap *configParams, AP_TimestampSet *tss)
 
void(* onSessionStop )(void *transportInternals, AP_int64 sourceId, AP_TimestampSet *tss)
 
void(* onSessionReconfigure )(void *transportInternals, AP_int64 sourceId, HashMap *configParams, AP_TimestampSet *tss)
 
void(* onSessionReset )(void *transportInternals, const char *transportName, AP_TimestampSet *tss)
 

Detailed Description

Adapter Session interface

The adapter must fill out this structure with working functions and provide it when initiaizing the Session library with AP_SESSION_Init().

See also
AP_SESSION_Init

Member Data Documentation

void(* AP_SESSION_AdapterInterface::onCorrelatorWatchDogTimedOut)(void *transportInternals)

Correlator Heartbeat Callback

When this is called, the heartbeating between the correlator and Session library has timed out. The assumption is made that the correlator is no longer running and the following should be carried out:-

  • Stop processing the messages from the external sources.
  • Clear all subscriptions.
  • Clean the Sessions.
  • Disconnect all the sources.
Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
void(* AP_SESSION_AdapterInterface::onSessionReconfigure)(void *transportInternals, AP_int64 sourceId, HashMap *configParams, AP_TimestampSet *tss)

Session Reconfigure Callback

A registered session as being signalled to reconfigure. The supplied configuration parameters should be used to reconfigure. If successful, call AP_SESSION_SessionReconfigureSuccess(), else AP_SESSION_SessionReconfigureError().

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
sourceIdThe source Id given to this session.
configParamsUser configuration parameters.
tssThe set of timestamps from the reconfig event.
See also
AP_SESSION_SessionReconfigureSuccess
AP_SESSION_SessionReconfigureError
void(* AP_SESSION_AdapterInterface::onSessionRegistrationError)(void *transportInternals, const char *sessionName, AP_TimestampSet *tss)

Session Registration Error Callback

This is called when an error occured during session registration after the adapter has called AP_SESSION_RegisterSession() or AP_SESSION_RegisterSessions().

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
sessionNameThe name of the session that failed registered.
tssThe set of timestamps from the error event.
See also
AP_SESSION_RegisterSession
AP_SESSION_RegisterSessions
onSessionRegistrationSuccess
void(* AP_SESSION_AdapterInterface::onSessionRegistrationSuccess)(void *transportInternals, const char *sessionName, AP_int64 sourceId, AP_TimestampSet *tss)

Session Registration Success Callback

This is called on a successful registration of a Session after the adapter has called AP_SESSION_RegisterSession() or AP_SESSION_RegisterSessions().

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
sessionNameThe name of the session successfully registered.
sourceIdThe source Id given to this session.
tssThe set of timestamps from the success event.
See also
AP_SESSION_RegisterSession
AP_SESSION_RegisterSessions
onSessionRegistrationError
void(* AP_SESSION_AdapterInterface::onSessionReset)(void *transportInternals, const char *transportName, AP_TimestampSet *tss)

Session Reset Callback

A registered session as being signalled to reset due to the correlator not receiving a heartbeat response, either due to unavailability of the adapter or network delay. The adapter should attempt the following:-

  • Clean all subscriptions.
  • Return to the initial state The correlator will then attempt to start the Session again and reconnect all symbols.
Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
transportNameThe name of the transport to be reset.
tssThe set of timestamps from the reset event.
void(* AP_SESSION_AdapterInterface::onSessionStart)(void *transportInternals, AP_int64 sourceId, HashMap *configParams, AP_TimestampSet *tss)

Session Start Callback

A registered session as being signalled to start, the adapter should attempt to connect to the external source. Once the session is connected, it should set the session state to SESSION_CONNECTED using AP_SESSION_SetSessionStateByName() or AP_SESSION_SetSessionStateById() and then call AP_SESSION_SessionStartSuccess(). If the connection fails, call AP_SESSION_SessionStartError().

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
sourceIdThe source Id given to this session.
configParamsUser configuration parameters.
tssThe set of timestamps from the start event.
See also
AP_SESSION_SessionStartSuccess
AP_SESSION_SessionStartError
AP_SESSION_SetSessionStateByName
AP_SESSION_SetSessionStateById
onSessionStop
void(* AP_SESSION_AdapterInterface::onSessionStop)(void *transportInternals, AP_int64 sourceId, AP_TimestampSet *tss)

Session Stop Callback

A registered and started session as being signalled to stop, the adapter should attempt the following:-

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
sourceIdThe source Id given to this session.
tssThe set of timestamps from the stop event.
See also
AP_SESSION_SessionStopSuccess
AP_SESSION_SessionStopError
AP_SESSION_SetSessionStateByName
AP_SESSION_SetSessionStateById
onSessionStart

The documentation for this struct was generated from the following file: