EMA C++ Edition
List of all members
refinitiv::ema::access::OmmRestLoggingClient Class Referenceabstract

OmmRestLoggingClient class provides callback mechanism to receive REST logging messages. More...

Public Member Functions

Callbacks
virtual void onRestLoggingEvent (const OmmConsumerRestLoggingEvent &ommLogRestEvent)=0
  More...
 

Protected Member Functions

Constructor
 OmmRestLoggingClient ()
 

Destructor

virtual ~OmmRestLoggingClient ()
 

Detailed Description

By default OmmConsumer class setup to print all the REST debug messages to output stream when enabled. Specifying OmmRestLoggingClient in OmmConsumerConfig overwrites this behaviour.

Remarks
Thread safety of all the methods in this class depends on user's implementation.

The following code snippet shows basic usage of OmmRestLoggingClient class in a simple consumer type app. User declares new class as derived from class OmmRestLoggingClient. Then registers the callback client (instance of the derived class) in OmmConsumerConfig.

// create an implementation for OmmRestLoggingClient to receive REST logging event that encapsulated REST logging messages
class AppRestClient : public OmmRestLoggingClient
{
void onRestLoggingEvent( const OmmConsumerRestLoggingEvent& ommLogRestEvent );
};
AppRestClient restClient;
// instantiate OmmConsumer object and set up the Rest callback client using OmmConsumerConfig
OmmConsumer consumer( OmmConsumerConfig().restLoggingCallback( restClient ) );
// User can provide into OmmConsumerConfig an optional closure that specified application defined identifier.
OmmConsumer consumer( OmmConsumerConfig().restLoggingCallback( restClient, closure ) );
virtual void onRestLoggingEvent(const OmmConsumerRestLoggingEvent &ommLogRestEvent)=0
See also
OmmConsumer, OmmConsumerConfig, OmmConsumerRestLoggingEvent

Definition at line 60 of file OmmRestLoggingClient.h.

Member Function Documentation

◆ onRestLoggingEvent()

virtual void refinitiv::ema::access::OmmRestLoggingClient::onRestLoggingEvent ( const OmmConsumerRestLoggingEvent ommLogRestEvent)
pure virtual

Invoked upon receiving REST logging message. Requires setting up the OmmRestLoggingClient into OmmConsumerConfig.

Parameters
[out]ommLogRestEventencapsulates REST logging message.
Returns
void