EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Protected Member Functions
thomsonreuters::ema::access::OmmProviderClient Class Reference

OmmProviderClient class provides callback interfaces to pass received messages. More...

Public Member Functions

Callbacks
virtual void onRefreshMsg (const RefreshMsg &refreshMsg, const OmmProviderEvent &event)
 
virtual void onStatusMsg (const StatusMsg &statusMsg, const OmmProviderEvent &event)
 
virtual void onGenericMsg (const GenericMsg &genericMsg, const OmmProviderEvent &event)
 
virtual void onAllMsg (const Msg &msg, const OmmProviderEvent &event)
 
virtual void onPostMsg (const PostMsg &postMsg, const OmmProviderEvent &event)
 
virtual void onReqMsg (const ReqMsg &reqMsg, const OmmProviderEvent &event)
 
virtual void onReissue (const ReqMsg &reqMsg, const OmmProviderEvent &event)
 
virtual void onClose (const ReqMsg &reqMsg, const OmmProviderEvent &event)
 

Protected Member Functions

 OmmProviderClient ()
 
virtual ~OmmProviderClient ()
 

Detailed Description

Application may need to implement an application client class inheriting from OmmProviderClient. In its own class, application needs to override callback methods it desires to use for item processing. Default empty callback methods are implemented by OmmProviderClient class.

Application may chose to implement specific callbacks (e.g., onRefreshMsg()) or a general callback (e.g., onAllMsg()).

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

The following code snippet shows basic usage of OmmProviderClient class to print recevied messages to screen.

class AppClient : public OmmProviderClient
{
void onRefreshMsg( const RefreshMsg& , const OmmProviderEvent& );
void onStatusMsg( const StatusMsg& , const OmmProviderEvent& );
};
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmProviderEvent& event )
{
cout << "Handle " << event.getHandle() << endl
<< "Closure " << event.getClosure() << endl
<< refreshMsg << endl;
}
void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmProviderEvent& event )
{
cout << "Handle " << event.getHandle() << endl
<< "Closure " << event.getClosure() << endl
<< statusMsg << endl;
}
See Also
OmmProvider, Msg, AckMsg, GenericMsg, RefreshMsg, StatusMsg

Definition at line 75 of file OmmProviderClient.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::OmmProviderClient::OmmProviderClient ( )
protected
virtual thomsonreuters::ema::access::OmmProviderClient::~OmmProviderClient ( )
protectedvirtual

Member Function Documentation

virtual void thomsonreuters::ema::access::OmmProviderClient::onAllMsg ( const Msg msg,
const OmmProviderEvent event 
)
virtual

Invoked upon receiving any message. Application need only implement this method if a desire to process all message types.

Parameters
[out]msgreceived message
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onClose ( const ReqMsg reqMsg,
const OmmProviderEvent event 
)
virtual

invoked upon receiving a close request message. Application need only implement this method if a desire to process item close messages.

Parameters
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onGenericMsg ( const GenericMsg genericMsg,
const OmmProviderEvent event 
)
virtual

Invoked upon receiving a generic message. Application need only implement this method if a desire to process messages of type GenericMsg.

Parameters
[out]genericMsgreceived genericMsg
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onPostMsg ( const PostMsg postMsg,
const OmmProviderEvent event 
)
virtual

invoked upon receiving a post message. Application need only implement this method if a desire to process messages of type PostMsg.

Parameters
[out]postMsgreceived postcMsg
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onRefreshMsg ( const RefreshMsg refreshMsg,
const OmmProviderEvent event 
)
virtual

Invoked upon receiving a refresh message. Refresh message may be a start, interim or final part.

Parameters
[out]refreshMsgreceived refreshMsg
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onReissue ( const ReqMsg reqMsg,
const OmmProviderEvent event 
)
virtual

invoked upon receiving a reissue request. Application need only implement this method if a desire to process reissue messages of type ReqMsg.

Parameters
[out]reqMsgreceived reqMsg
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onReqMsg ( const ReqMsg reqMsg,
const OmmProviderEvent event 
)
virtual

invoked upon receiving an initial item request message. Application need only implement this method if a desire to process intial messages of type ReqMsg.

Parameters
[out]reqMsgreceived reqMsg
[out]eventidentifies open item for which this message is received
Returns
void
virtual void thomsonreuters::ema::access::OmmProviderClient::onStatusMsg ( const StatusMsg statusMsg,
const OmmProviderEvent event 
)
virtual

Invoked upon receiving a status message.

Parameters
[out]statusMsgreceived statusMsg
[out]eventidentifies open item for which this message is received
Returns
void