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

ServiceEndpointDiscovery class provides the functionality to query endpoints from RDP service discovery. More...

Public Member Functions

Constructor
 ServiceEndpointDiscovery ()
  More...
 
 ServiceEndpointDiscovery (const ServiceEndpointDiscoveryConfig &serviceEndpointDiscoveryConfig)
  More...
 
 ServiceEndpointDiscovery (const EmaString &tokenServiceURLV1)
  More...
 
 ServiceEndpointDiscovery (const EmaString &tokenServiceURLV1, const EmaString &serviceDiscoveryURL)
  More...
 
 ServiceEndpointDiscovery (const EmaString &tokenServiceURLV1, const EmaString &tokenServiceURLV2, const EmaString &serviceDiscoveryURL)
  More...
 
Destructor
 ~ServiceEndpointDiscovery ()
  More...
 

Operations

void registerClient (const ServiceEndpointDiscoveryOption &params, ServiceEndpointDiscoveryClient &client, void *closure=0)
  More...
 

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 59 of file ServiceEndpointDiscovery.h.

Constructor & Destructor Documentation

◆ ServiceEndpointDiscovery() [1/5]

refinitiv::ema::access::ServiceEndpointDiscovery::ServiceEndpointDiscovery ( )

Create an ServiceEndpointDiscovery with the default settings.

Remarks
This affects exceptions thrown from ServiceEndpointDiscovery methods

◆ ServiceEndpointDiscovery() [2/5]

refinitiv::ema::access::ServiceEndpointDiscovery::ServiceEndpointDiscovery ( const ServiceEndpointDiscoveryConfig serviceEndpointDiscoveryConfig)

Create an ServiceEndpointDiscovery from a ServiceEndpointDiscoveryConfig.

Parameters
[in]serviceEndpointDiscoveryConfigspecifies the configuration object containing configurations for service discovery.
Remarks
This affects exceptions thrown from ServiceEndpointDiscovery methods

◆ ServiceEndpointDiscovery() [3/5]

refinitiv::ema::access::ServiceEndpointDiscovery::ServiceEndpointDiscovery ( const EmaString tokenServiceURLV1)

Create an ServiceEndpointDiscovery.

Parameters
[in]tokenServiceURLV1specifies the token service URL V1 to override the default value.
Remarks
This affects exceptions thrown from ServiceEndpointDiscovery methods

◆ ServiceEndpointDiscovery() [4/5]

refinitiv::ema::access::ServiceEndpointDiscovery::ServiceEndpointDiscovery ( const EmaString tokenServiceURLV1,
const EmaString serviceDiscoveryURL 
)

Create an ServiceEndpointDiscovery.

Parameters
[in]tokenServiceURLV1specifies the token service URL V1 to override the default value.
[in]serviceDiscoveryURLspecifies the service discovery URL to override the default value.
Remarks
This affects exceptions thrown from ServiceEndpointDiscovery methods

◆ ServiceEndpointDiscovery() [5/5]

refinitiv::ema::access::ServiceEndpointDiscovery::ServiceEndpointDiscovery ( const EmaString tokenServiceURLV1,
const EmaString tokenServiceURLV2,
const EmaString serviceDiscoveryURL 
)

Create an ServiceEndpointDiscovery.

Parameters
[in]tokenServiceURLV1specifies the token service URL for V1 to override the default value.
[in]tokenServiceURLV2specifies the token service URL for V2 to override the default value.
[in]serviceDiscoveryURLspecifies the service discovery URL to override the default value.
Remarks
This affects exceptions thrown from ServiceEndpointDiscovery methods

◆ ~ServiceEndpointDiscovery()

refinitiv::ema::access::ServiceEndpointDiscovery::~ServiceEndpointDiscovery ( )

Destructor.

Member Function Documentation

◆ registerClient()

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

Queries the RDP 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