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

ServiceEndpointDiscovery class provides the functionality to query endpoints from EDP-RT service discovery. More...

Public Member Functions

Constructor
 ServiceEndpointDiscovery (const EmaString &tokenServiceURL="https://api.refinitiv.com/auth/oauth2/v1/token", const EmaString &serviceDiscoveryURL="https://api.refinitiv.com/streaming/pricing/v1/")
 
Destructor
 ~ServiceEndpointDiscovery ()
 
Operations
void registerClient (const ServiceEndpointDiscoveryOption &params, ServiceEndpointDiscoveryClient &client, void *closure=0)
 

Detailed Description

Application interacts with the service discovery through the ServiceEndpointDiscovery interface methods. The results of these interactions are communicated back to application through ServiceEndpointDiscoveryClient.

The following code snippet shows basic usage of ServiceEndpointDiscovery class in a simple consumer type app.

// create an implementation for ServiceEndpointDiscoveryClient to process
class AppClient : public ServiceEndpointDiscoveryClient
{
void onSuccess( const ServiceEndpointDiscoveryResp& , const ServiceEndpointDiscoveryEvent& );
void onError( const EmaString& , const ServiceEndpointDiscoveryEvent& );
};
AppClient appClient;
// instantiate ServiceEndpointDiscovery object
// Query endpoints
consumer.registerClient( ServiceEndpointDiscoveryOption().username(userName).password(password)
See Also
ServiceEndpointDiscoveryOption, ServiceEndpointDiscoveryClient, OmmException

Definition at line 58 of file ServiceEndpointDiscovery.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::ServiceEndpointDiscovery::ServiceEndpointDiscovery ( const EmaString tokenServiceURL = "https://api.refinitiv.com/auth/oauth2/v1/token",
const EmaString serviceDiscoveryURL = "https://api.refinitiv.com/streaming/pricing/v1/" 
)

Create an ServiceEndpointDiscovery.

Parameters
[in]tokenServiceURLspecifies the token service URL to override the default value.
[in]serviceDiscoveryURLspecifies the service discovery URL to override the default value.
Remarks
This affects exceptions thrown from ServiceEndpointDiscovery methods
thomsonreuters::ema::access::ServiceEndpointDiscovery::~ServiceEndpointDiscovery ( )

Destructor.

Member Function Documentation

void thomsonreuters::ema::access::ServiceEndpointDiscovery::registerClient ( const ServiceEndpointDiscoveryOption params,
ServiceEndpointDiscoveryClient client,
void *  closure = 0 
)

Queries the EDP-RT service discovery synchronously to get endpoints according to the specified parameters

Parameters
[in]paramsspecifies query options to get endpoints
[in]clientspecifies ServiceEndpointDiscoveryClient instance receiving notifications about this query
[in]closurespecifies application defined query identification
Exceptions
OmmMemoryExhaustionExceptionif system runs out of memory
OmmInvalidUsageExceptionif application passes invalid ServiceEndpointDiscoveryOption
Remarks
This is synchronous call and this method returns after receving a response
This method is Object Level Thread Safe Method