EMA C++ Edition
List of all members
refinitiv::ema::access::ServiceEndpointDiscoveryClient Class Reference

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

Callbacks

virtual void onSuccess (const ServiceEndpointDiscoveryResp &serviceEndpointResp, const ServiceEndpointDiscoveryEvent &event)
  More...
 
virtual void onError (const EmaString &errorText, const ServiceEndpointDiscoveryEvent &event)
  More...
 
 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;
}
virtual void onError(const EmaString &errorText, const ServiceEndpointDiscoveryEvent &event)
virtual void onSuccess(const ServiceEndpointDiscoveryResp &serviceEndpointResp, const ServiceEndpointDiscoveryEvent &event)
See also
ServiceEndpointDiscovery, ServiceEndpointDiscoveryResp, ServiceEndpointDiscoveryEvent,

Definition at line 60 of file ServiceEndpointDiscoveryClient.h.

Member Function Documentation

◆ onError()

virtual void refinitiv::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

◆ onSuccess()

virtual void refinitiv::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