OnixS C++ Tullett Prebon SURF Handler  1.6.1
API documentation
Handler Class Reference

#include <OnixS/SURF/MarketData/Handler.h>

Public Member Functions

 Handler (const HandlerSettings &settings)
 
virtual ~Handler ()
 
void registerErrorListener (ErrorListener *listener)
 
void registerWarningListener (WarningListener *listener)
 
void registerHandlerStateListener (HandlerStateListener *listener)
 
void registerRecordListener (RecordListener *listener)
 
void connect (const std::string &host, int port)
 
void disconnect ()
 
void subscribe (FieldId fieldId)
 
void unsubscribe (FieldId fieldId)
 
HandlerState::Enum state () const
 
void log (LogLevel::Enum logLevel, const char *logMessage, size_t length)
 
void log (LogLevel::Enum logLevel, const char *logMessage)
 
void log (LogLevel::Enum logLevel, const std::string &str)
 
const char * licenseExpirationDate () const
 

Static Public Member Functions

static const char * version ()
 

Detailed Description

Definition at line 36 of file Handler.h.

Constructor & Destructor Documentation

Handler ( const HandlerSettings settings)

Performs instance initialization.

Parameters
settingsdefines values for various options which affect handler behavior like enabling logging during execution of the handler.
virtual ~Handler ( )
virtual

Finalizes the Handler.

Member Function Documentation

void connect ( const std::string &  host,
int  port 
)

Connects the Handler to the given host and port.

Exceptions
std::exceptionin case of unable to establish TCP connection.
void disconnect ( )

Disconnects the Handler.

const char* licenseExpirationDate ( ) const

Returns the license expiration date.

void log ( LogLevel::Enum  logLevel,
const char *  logMessage,
size_t  length 
)

Logs the given user-level message to the handler log.

void log ( LogLevel::Enum  logLevel,
const char *  logMessage 
)

Logs the given user-level message to the handler log.

void log ( LogLevel::Enum  logLevel,
const std::string &  str 
)

Logs the given user-level message to the handler log.

void registerErrorListener ( ErrorListener listener)

Assigns listener for errors occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.

Exceptions
OperationExceptionif handler not disconnected
void registerHandlerStateListener ( HandlerStateListener listener)

Assigns listener for state change events occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.

Exceptions
OperationExceptionif handler not disconnected.
void registerRecordListener ( RecordListener listener)

Assigns listener for records received while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.

Exceptions
OperationExceptionif handler not disconnected.
void registerWarningListener ( WarningListener listener)

Assigns listener for warnings occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.

Exceptions
OperationExceptionif handler not disconnected
HandlerState::Enum state ( ) const

Returns handler state.

void subscribe ( FieldId  fieldId)

Subscribes to the records with given field ID.

Parameters
fieldId- identifier of field.
Exceptions
ArgumentRangeExceptionif fieldId is not in valid range.
void unsubscribe ( FieldId  fieldId)

Unsubscribes for the records with given field ID.

Parameters
fieldId- identifier of field.
Exceptions
ArgumentRangeExceptionif fieldId is not in valid range.
static const char* version ( )
static

Returns Handler's version.


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