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

OmmConsumerConfig is used to modify configuration and behavior of OmmConsumer. More...

Public Types

enum  EncryptionProtocolTypes {
  ENC_NONE = 0x00,
  ENC_TLSV1_2 = 0x04
}
 
enum  OperationModel {
  UserDispatchEnum,
  ApiDispatchEnum
}
 

Public Member Functions

Constructor
 OmmConsumerConfig ()
 
 OmmConsumerConfig (const EmaString &path)
 
Destructor
virtual ~OmmConsumerConfig ()
 
Operations
OmmConsumerConfigclear ()
 
OmmConsumerConfigusername (const EmaString &username)
 
OmmConsumerConfigpassword (const EmaString &password)
 
OmmConsumerConfigposition (const EmaString &position)
 
OmmConsumerConfigapplicationId (const EmaString &applicationId)
 
OmmConsumerConfigclientId (const EmaString &clientId)
 
OmmConsumerConfigclientSecret (const EmaString &clientSecret)
 
OmmConsumerConfigtokenScope (const EmaString &tokenScope="trapi.streaming.pricing.read")
 
OmmConsumerConfigtakeExclusiveSignOnControl (bool takeExclusiveSignOnControl=true)
 
OmmConsumerConfigtokenServiceUrl (const EmaString &tokenServiceUrl="https://api.refinitiv.com/auth/oauth2/v1/token")
 
OmmConsumerConfigserviceDiscoveryUrl (const EmaString &serviceDiscoveryUrl="https://api.refinitiv.com/streaming/pricing/v1/")
 
OmmConsumerConfighost (const EmaString &host="localhost:14002")
 
OmmConsumerConfigoperationModel (OperationModel operationModel=ApiDispatchEnum)
 
OmmConsumerConfigconsumerName (const EmaString &consumerName)
 
OmmConsumerConfigtunnelingProxyHostName (const EmaString &proxyHostName)
 
OmmConsumerConfigtunnelingProxyPort (const EmaString &proxyPort)
 
OmmConsumerConfigtunnelingSecurityProtocol (int securityProtocol)
 
OmmConsumerConfigtunnelingObjectName (const EmaString &objectName)
 
OmmConsumerConfigtunnelingLibSslName (const EmaString &libsslName)
 
OmmConsumerConfigtunnelingLibCryptoName (const EmaString &libcryptoName)
 
OmmConsumerConfiglibcurlName (const EmaString &libcurlName)
 
OmmConsumerConfigproxyUserName (const EmaString &proxyUserName)
 
OmmConsumerConfigproxyPasswd (const EmaString &proxyPasswd)
 
OmmConsumerConfigproxyDomain (const EmaString &proxyDomain)
 
OmmConsumerConfigsslCAStore (const EmaString &sslCAStore)
 
OmmConsumerConfigconfig (const Data &config)
 
OmmConsumerConfigaddAdminMsg (const ReqMsg &reqMsg)
 

Friends

class OmmConsumer
 
class OmmConsumerImpl
 

Detailed Description

OmmConsumerConfig provides a default basic OmmConsumer configuration.

The default configuration may be modified and or appended by using EmaConfig.xml file or any interface methods of this class.

The EmaConfig.xml file is read in if it is present in the working directory of the application.

Calling any interface methods of OmmConsumerConfig class overrides or appends the existing configuration.

Remarks
All methods in this class are Lock-free Method.
See Also
OmmConsumer

Definition at line 42 of file OmmConsumerConfig.h.

Member Enumeration Documentation

Enumerator
ENC_NONE 

(0x00) No encryption.

ENC_TLSV1_2 

(0x08) Encryption using TLSv1.2 protocol

Definition at line 54 of file OmmConsumerConfig.h.

Enumerator
UserDispatchEnum 

specifies callbacks happen on user thread of control

ApiDispatchEnum 

specifies callbacks happen on API thread of control

Definition at line 48 of file OmmConsumerConfig.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::OmmConsumerConfig::OmmConsumerConfig ( )

Create an OmmConsumerConfig that enables customization of default implicit administrative domains and local configuration.

thomsonreuters::ema::access::OmmConsumerConfig::OmmConsumerConfig ( const EmaString path)

Create an OmmConsumerConfig that enables customization of default implicit administrative domains and local configuration.

Parameters
[in]pathspecifies configuration file name or name of directory containing a file named EmaConfig.xml
Remarks
path is optional. If not specified, application will use EmaConfig.xml (if any) found in current working directory
virtual thomsonreuters::ema::access::OmmConsumerConfig::~OmmConsumerConfig ( )
virtual

Destructor.

Member Function Documentation

OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::addAdminMsg ( const ReqMsg reqMsg)

Specifies an administrative request message to override the default administrative request. Application may call multiple times prior to initialization. Supported domains include Login, Directory, and Dictionary.

Parameters
[in]reqMsgspecifies administrative domain request message
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::applicationId ( const EmaString applicationId)

Specifies the authorization application identifier. Must be unique for each application. Range 257 to 65535 is available for site-specific use. Range 1 to 256 is reserved.

Parameters
[in]applicationIdspecifies respective login request attribute
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::clear ( )

Clears the OmmConsumerConfig and sets all the defaults.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::clientId ( const EmaString clientId)

Specifies an unique identifier defined for making an authentication request to the token service

Parameters
[in]clientIdspecifies an unique identifier.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::clientSecret ( const EmaString clientSecret)

Specifies optionally a secret used by OAuth client to authenticate to the Authorization Server.

Parameters
[in]clientSecretspecifies a client secret.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::config ( const Data config)

Specifies the local configuration, overriding and adding to the current content.

Parameters
[in]configspecifies OmmConsumer configuration
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::consumerName ( const EmaString consumerName)

Create an OmmConsumer with consumer name. The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This name identifies configuration section to be used by OmmConsumer instance.

Parameters
[in]consumerNamespecifies name of OmmConsumer instance
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::host ( const EmaString host = "localhost:14002")

Specifies a hostname and port. Overrides prior value.

Remarks
Implies usage of TCP IP channel or RSSL_CONN_TYPE_SOCKET.
Parameters
[in]hostspecifies server and port to which OmmConsumer will connect
Remarks
if host set to "<hostname>:<port>", then hostname:port is assumed
if host set to "", then localhost:14002 is assumed
if host set to ":", then localhost:14002 is assumed
if host set to "<hostname>", then hostname:14002 is assumed
if host set to "<hostname>:", then hostname:14002 is assumed
if host set to ":<port>", then localhost:port is assumed
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::libcurlName ( const EmaString libcurlName)
Specifies the name of the lbicurl.so shared library for connecting through HTTP proxies. 
This is supported on Socket connections and Encrypted connections with Socket encrypted protocol.
Parameters
[in]libcurlNamespecifies the name of the libcurl.so shared library
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::operationModel ( OperationModel  operationModel = ApiDispatchEnum)

Specifies the operation model, overriding the default. The operation model specifies whether to dispatch messages in the user or application thread of control.

Parameters
[in]specifiesthreading and dispatching model used by application
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::password ( const EmaString password)

Specifies the password. Overrides a value specified in Login domain via the addAdminMsg(..) method.

Parameters
[in]passwordspecifies respective login request attribute
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::position ( const EmaString position)

Specifies the position. Overrides a value specified in Login domain via the addAdminMsg(..) method.

Parameters
[in]positionspecifies respective login request attribute
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::proxyDomain ( const EmaString proxyDomain)

Specifies the domain of the user to authenticate. Needed for NTLM or for Negotiate/Kerberos or for Kerberos authentication protocols.

For Negotiate/Kerberos or for Kerberos authentication protocols, proxyDomain should be the same as the domain in the 'realms' and 'domain_realm' sections of the Kerberos configuration file.

Parameters
[in]proxyDomainspecifies the domain used for tunneling connection.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::proxyPasswd ( const EmaString proxyPasswd)

Specifies the passwd to authenticate. Needed for all authentication protocols.

Parameters
[in]proxyPasswdspecifies password used for tunneling connection.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::proxyUserName ( const EmaString proxyUserName)

Specifies the user name to authenticate. Needed for all authentication protocols.

Parameters
[in]proxyUserNamespecifies user name used for tunneling connection.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::serviceDiscoveryUrl ( const EmaString serviceDiscoveryUrl = "https://api.refinitiv.com/streaming/pricing/v1/")

Specifies an URL to override the default for the EDP service discovery to get global endpoints

Parameters
[in]serviceDiscoveryUrlspecifies an URL for EDP service discovery.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::sslCAStore ( const EmaString sslCAStore)
Specifies the path to an OpenSSL Certificate Authority store.
Parameters
[in]sslCAStorespecifies the file or directory where the CA store is located.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::takeExclusiveSignOnControl ( bool  takeExclusiveSignOnControl = true)

Specifies optionally the exclusive sign on control to force sign-out of other applications using the same credentials.

Parameters
[in]takeExclusiveSignOnControlthe exclusive sign on control.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tokenScope ( const EmaString tokenScope = "trapi.streaming.pricing.read")

Specifies optionally token scope to limit the scope of generated token from the token service.

Parameters
[in]tokenScopespecifies a token scope
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tokenServiceUrl ( const EmaString tokenServiceUrl = "https://api.refinitiv.com/auth/oauth2/v1/token")

Specifies an URL to override the default for token service to perform authentication to get access and refresh tokens.

Parameters
[in]tokenServiceUrlspecifies an URL for token service.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tunnelingLibCryptoName ( const EmaString libcryptoName)

Specifies the name of the libcrypto.so shared library for Encrypted connections.

Parameters
[in]libsslNamespecifies the name of the libcrypto.so shared library
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tunnelingLibSslName ( const EmaString libsslName)

Specifies the name of the libssl.so shared library for Encrypted connections.

Parameters
[in]libsslNamespecifies the name of the libssl.so shared library
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tunnelingObjectName ( const EmaString objectName)

Specifies the object name to pass along with the underlying URL in HTTP and HTTPS connection messages.

Parameters
[in]objectNamespecifies the object name.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tunnelingProxyHostName ( const EmaString proxyHostName)

Specifies the address or host name of the proxy server to connect to for an HTTP or HTTPS connection.

Parameters
[in]proxyHostNamespecifies the address or host name of the proxy server for tunneling connection.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tunnelingProxyPort ( const EmaString proxyPort)

Specifies the port number of the proxy server to connect to for an HTTP or HTTPS connection.

Parameters
[in]proxyPortspecifies the port number of the proxy server for tunneling connection.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::tunnelingSecurityProtocol ( int  securityProtocol)

Specifies the cryptographic protocols to be used for an Encrypted connection on a Linux operating system, of values TLSv1.2. The highest value of TLS will be selected by the Rssl API first, then it will roll back if the encryption handshake fails. The protocol defaults to TLSv1.2. Use OmmConsumerConfig::EncryptedProtocolTypes flags to set allowed protocols.

Parameters
[in]securityProtocolspecifies a cryptopgraphic protocol.
Returns
reference to this object
OmmConsumerConfig& thomsonreuters::ema::access::OmmConsumerConfig::username ( const EmaString username)

Specifies the username. Overrides a value specified in Login domain via the addAdminMsg(..) method.

Parameters
[in]usernamespecifies name used on login request
Returns
reference to this object

Friends And Related Function Documentation

friend class OmmConsumer
friend

Definition at line 279 of file OmmConsumerConfig.h.

friend class OmmConsumerImpl
friend

Definition at line 278 of file OmmConsumerConfig.h.