OmmConsumer class encapsulates functionality of an Omm consuming type application. More...
Public Types | |
enum | DispatchReturn { TimeoutEnum = -1 , DispatchedEnum = 0 } |
enum | DispatchTimeout { InfiniteWaitEnum = -1 , NoWaitEnum = 0 } |
Operations | |
UInt64 | registerClient (const ReqMsg &reqMsg, OmmConsumerClient &client, void *closure=0, UInt64 parentHandle=0) |
More... | |
UInt64 | registerClient (const TunnelStreamRequest &tunnelStreamRequest, OmmConsumerClient &client, void *closure=0) |
More... | |
void | reissue (const ReqMsg &reqMsg, UInt64 handle) |
More... | |
void | submit (const GenericMsg &genericMsg, UInt64 handle) |
More... | |
void | submit (const PostMsg &postMsg, UInt64 handle) |
More... | |
Int64 | dispatch (Int64 dispatchTimeout=NoWaitEnum) |
More... | |
void | unregister (UInt64 handle) |
More... | |
void | getChannelInformation (ChannelInformation &) |
More... | |
void | getChannelStatistics (ChannelStatistics &) |
More... | |
void | modifyIOCtl (Int32 code, Int32 value) |
More... | |
void | modifyReactorIOCtl (Int32 code, Int32 value) |
More... | |
void | renewOAuth2Credentials (OAuth2CredentialRenewal &) |
More... | |
void | renewLoginCredentials (LoginMsgCredentialRenewal &) |
More... | |
OmmConsumer provides interfaces to open, modify and close items. It establishes and maintains connection to server, maintains open item watch list, performs connection and item recovery, etc.
OmmConsumer provides a default behaviour / functionality. This may be tuned / modified by application when using OmmConsumerConfig.
Application interacts with server through the OmmConsumer interface methods. The results of these interactions are communicated back to application through OmmConsumerClient and OmmConsumerErrorclient.
The following code snippet shows basic usage of OmmConsumer class in a simple consumer type app. This application opens a regular streaming item named RTR from a service RDF from the 1.1.1.1 server on port 14002.
The following code snippet shows usage of OmmConsumer class to obtain data from the Auxiliary Services Gateway (or ASG). This application opens a tunnel stream to an ASG through the 1.1.1.1 server on port 14002. The tunnel stream is open from the ASG provided service named ASG_SERVICE. Then a streaming item named IBM_ASG is open on that stream from a service Id of 1.
Definition at line 141 of file OmmConsumer.h.
Enumerator | |
---|---|
TimeoutEnum | no message was dispatch on this dispatch call |
DispatchedEnum | a message was dispatched on this dispatch call |
Definition at line 155 of file OmmConsumer.h.
Enumerator | |
---|---|
InfiniteWaitEnum | dispatch blocks till a message arrives |
NoWaitEnum | dispatch exits immediately even if there is no message |
Definition at line 147 of file OmmConsumer.h.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config | ) |
Create an OmmConsumer with OmmConsumerConfig. The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmConsumerClient & | client, | ||
void * | closure = 0 |
||
) |
Create an OmmConsumer with OmmConsumerConfig. The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This constructor will also register for all login events via the provided OmmConsumerClient and optional closure.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmOAuth2ConsumerClient & | oAuthClient, | ||
void * | closure = 0 |
||
) |
Create an OmmConsumer with OmmConsumerConfig with an OmmConsumerErrorClient that provides select global errors via callbacks opposed to exception.The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This constructor will also register for any oAuth credentials requests, allowing the application to use a secure credentials storage and an optional closure.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmOAuth2ConsumerClient & | oAuthClient, | ||
OmmConsumerErrorClient & | errorClient, | ||
void * | closure = 0 |
||
) |
Create an OmmConsumer with OmmConsumerConfig with an OmmConsumerErrorClient that provides select global errors via callbacks opposed to exception.The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This constructor will also register for any oAuth credentials requests, allowing the application to use a secure credentials storage and an optional closure.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmConsumerErrorClient & | client | ||
) |
Create an OmmConsumer with OmmConsumerConfig with an OmmConsumerErrorClient that provides select global errors via callbacks opposed to exception.The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmConsumerClient & | adminClient, | ||
OmmOAuth2ConsumerClient & | oAuthClient, | ||
void * | closure = 0 |
||
) |
Create an OmmConsumer with OmmConsumerConfig with an OmmConsumerErrorClient that provides select global errors via callbacks opposed to exception.The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This constructor will also register for all login events via the provided OmmConsumerClient and optional closure.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmConsumerClient & | adminClient, | ||
OmmConsumerErrorClient & | errorClient, | ||
void * | closure = 0 |
||
) |
Create an OmmConsumer with OmmConsumerConfig with an OmmConsumerErrorClient that provides select global errors via callbacks opposed to exception.The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This constructor will also register for all login events via the provided OmmConsumerClient and optional closure.
refinitiv::ema::access::OmmConsumer::OmmConsumer | ( | const OmmConsumerConfig & | config, |
OmmConsumerClient & | adminClient, | ||
OmmOAuth2ConsumerClient & | oAuthClient, | ||
OmmConsumerErrorClient & | errorClient, | ||
void * | closure = 0 |
||
) |
Create an OmmConsumer with OmmConsumerConfig with an OmmConsumerErrorClient that provides select global errors via callbacks opposed to exception.The OmmConsumer enables functionality that includes subscribing, posting and distributing generic messages. This constructor will also register for all login events via the provided OmmConsumerClient and optional closure. This constructor will also register for any oAuth credentials requests, allowing the application to use a secure credentials storage.
|
virtual |
Destructor.
Int64 refinitiv::ema::access::OmmConsumer::dispatch | ( | Int64 | dispatchTimeout = NoWaitEnum | ) |
Relinquish application thread of control to receive callbacks via OmmConsumerClient descendant.
[in] | dispatchTimeout | specifies time in microseconds to wait in dispatch() for a message to dispatch (DispatchTimeout enumerations provide predefined values) |
OmmInvalidUsageException | if OperationalModel is not set to UserDispatchEnum |
void refinitiv::ema::access::OmmConsumer::getChannelInformation | ( | ChannelInformation & | ) |
Provides channel information about the active channel.
[in] | caller | provider ChannelInformation&; parameter will be cleared and then current channel information will be provided |
void refinitiv::ema::access::OmmConsumer::getChannelStatistics | ( | ChannelStatistics & | ) |
Provides channel statistics about the active channel.
[in] | caller | provider ChannelStatistics&; parameter will be cleared and then current channel statistics will be provided |
OmmInvalidUsageException | if it cannot get the channel statistics |
const EmaString& refinitiv::ema::access::OmmConsumer::getConsumerName | ( | ) | const |
Retrieve internally generated consumer instance name.
Allows modifying some I/O values programmatically for a channel to override the default values.
[in] | code | provides Code of I/O option defined in IOCtlCode::IOCtlCodeEnum to modify. |
[in] | value | provides Value to modify I/O option to |
OmmInvalidUsageException | if failed to modify I/O option to |
Allows modifying some I/O values programmatically for Reactor to override the default values.
[in] | code | provides Code of I/O option defined in IOCtlReactorCode::IOCtlReactorCodeEnum to modify. |
[in] | value | provides Value to modify I/O option to |
OmmInvalidUsageException | if failed to modify I/O option to |
UInt64 refinitiv::ema::access::OmmConsumer::registerClient | ( | const ReqMsg & | reqMsg, |
OmmConsumerClient & | client, | ||
void * | closure = 0 , |
||
UInt64 | parentHandle = 0 |
||
) |
Opens an item stream
[in] | reqMsg | specifies item and its unique attributes |
[in] | client | specifies OmmConsumerClient instance receiving notifications about this item |
[in] | closure | specifies application defined item identification |
[in] | parentHandle | specifies handle of tunnel stream over which this substream is open (required for substreams) |
OmmMemoryExhaustionException | if system runs out of memory |
OmmInvalidUsageException | if application passes invalid ReqMsg |
OmmInvalidHandlException | if application passes invalid parent item handle |
UInt64 refinitiv::ema::access::OmmConsumer::registerClient | ( | const TunnelStreamRequest & | tunnelStreamRequest, |
OmmConsumerClient & | client, | ||
void * | closure = 0 |
||
) |
Opens a tunnel stream
[in] | tunnelStreamRequest | specifies tunnel stream attributes |
[in] | client | specifies OmmConsumerClient instance receiving notifications about this item |
[in] | closure | specifies application defined item identification |
OmmMemoryExhaustionException | if system runs out of memory |
OmmInvalidUsageException | if application passes invalid TunnelStreamRequest |
Changes the interest in an open item stream. The first formal parameter houses a ReqMsg. ReqMsg attributes that may change are Priority(), InitialImage(), InterestAfterRefresh(), Pause() and Payload ViewData(). The second formal parameter is a handle that identifies the open stream to be modified.
[in] | reqMsg | specifies modifications to the open item stream |
[in] | handle | identifies item to be modified |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
OmmInvalidUsageException | if passed in ReqMsg violates reissue rules |
void refinitiv::ema::access::OmmConsumer::renewLoginCredentials | ( | LoginMsgCredentialRenewal & | ) |
Provide updated Login credentials when the callback OmmLoginCredentialConsumerClient::onCredentialRenewal is called. This function allows the application to use update login userName and authenticationExtended information during a reconnection.
[in] | LoginMsgCredentialRenewal | object that contains the credentials. |
OmmInvalidUsageException | if the credential update fails. |
void refinitiv::ema::access::OmmConsumer::renewOAuth2Credentials | ( | OAuth2CredentialRenewal & | ) |
Provide updated OAuth2 credentials when the callback OmmOAuth2ConsumerClient::onCredentialRenewal is called. This function allows the application to use a secure credential storage when using RDP functionality such as the RDP token service or RDP service discovery.
[in] | OAuth2CredentialRenewal | object that contains the credentials. |
OmmInvalidUsageException | if the credential update fails. |
void refinitiv::ema::access::OmmConsumer::submit | ( | const GenericMsg & | genericMsg, |
UInt64 | handle | ||
) |
Sends a GenericMsg.
[in] | genericMsg | specifies GenericMsg to be sent on the open item stream |
[in] | identifies | item stream on which to send the GenericMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
Sends a PostMsg. Accepts a PostMsg and optionally a handle associated to an open item stream.
Specifying an item handle is known as "on stream posting". Specifying a login handle is known as "off stream posting".
[in] | postMsg | specifies PostMsg to be sent on the open item stream |
[in] | identifies | item stream on which to send the PostMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
void refinitiv::ema::access::OmmConsumer::unregister | ( | UInt64 | handle | ) |
Relinquishes interest in an open item stream.
[in] | handle | identifies item to close |
![]() |
![]() |
|