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::ServiceEndpointDiscoveryClient Class Reference

ServiceEndpointDiscoveryClient class provides callback interfaces to pass received responses. More...

Public Member Functions

Callbacks
virtual void onSuccess (const ServiceEndpointDiscoveryResp &serviceEndpointResp, const ServiceEndpointDiscoveryEvent &event)
 
virtual void onError (const EmaString &errorText, const ServiceEndpointDiscoveryEvent &event)
 

Protected Member Functions

 ServiceEndpointDiscoveryClient ()
 
virtual ~ServiceEndpointDiscoveryClient ()
 

Detailed Description

Application needs to implement an application client class inheriting from ServiceEndpointDiscoveryClient. In its own class, application needs to override callback methods it desires to use for receiving responses. Default empty callback methods are implemented by ServiceEndpointDiscoveryClient class.

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

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

class AppClient : public ServiceEndpointDiscoveryClient
{
void onSuccess( const ServiceEndpointDiscoveryResp& , const ServiceEndpointDiscoveryEvent& );
void onError( const EmaString& errorText, const ServiceEndpointDiscoveryEvent& )
};
void AppClient::onSuccess( const ServiceEndpointDiscoveryResp& serviceEndpointResp, const ServiceEndpointDiscoveryEvent& event)
{
cout << serviceEndpointResp << endl;
}
void AppClient::onError(const EmaString& errorText, const ServiceEndpointDiscoveryEvent& event)
{
cout << errorText << endl;
}
See Also
ServiceEndpointDiscovery, ServiceEndpointDiscoveryResp, ServiceEndpointDiscoveryEvent,

Definition at line 60 of file ServiceEndpointDiscoveryClient.h.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void thomsonreuters::ema::access::ServiceEndpointDiscoveryClient::onError ( const EmaString errorText,
const ServiceEndpointDiscoveryEvent event 
)
virtual
Invoked upon receiving an error response.
Parameters
[out]errorTextreceived error text message
[out]eventidentifies open query for which this response is received
Returns
void
virtual void thomsonreuters::ema::access::ServiceEndpointDiscoveryClient::onSuccess ( const ServiceEndpointDiscoveryResp serviceEndpointResp,
const ServiceEndpointDiscoveryEvent event 
)
virtual

Invoked upon receiving a success response.

Parameters
[out]serviceEndpointRespreceived ServiceEndpointDiscoveryResp
[out]eventidentifies open query for which this response is received
Returns
void