OmmProvider class encapsulates functionality of an Interactive and NonInteractive OmmProvider application. More...
Public Types | |
enum | DispatchReturn { TimeoutEnum = -1 , DispatchedEnum = 0 } |
enum | DispatchTimeout { InfiniteWaitEnum = -1 , NoWaitEnum = 0 } |
Public Member Functions | |
Constructor | |
OmmProvider (const OmmProviderConfig &config) | |
More... | |
OmmProvider (const OmmProviderConfig &config, OmmProviderClient &client, void *closure=0) | |
More... | |
OmmProvider (const OmmProviderConfig &config, OmmProviderErrorClient &errorclient) | |
More... | |
OmmProvider (const OmmProviderConfig &config, OmmProviderClient &client, OmmProviderErrorClient &errorclient, void *closure=0) | |
More... | |
Destructor | |
virtual | ~OmmProvider () |
More... | |
Accessors | |
const EmaString & | getProviderName () const |
More... | |
OmmProviderConfig::ProviderRole | getProviderRole () const |
More... | |
Operations | |
class | PackedMsgImpl |
UInt64 | registerClient (const ReqMsg &reqMsg, OmmProviderClient &client, void *closure=0) |
More... | |
void | reissue (const ReqMsg &reqMsg, UInt64 handle) |
More... | |
void | submit (const GenericMsg &genericMsg, UInt64 handle) |
More... | |
void | submit (const RefreshMsg &refreshMsg, UInt64 handle) |
More... | |
void | submit (const UpdateMsg &updateMsg, UInt64 handle) |
More... | |
void | submit (const StatusMsg &statusMsg, UInt64 handle) |
More... | |
void | submit (const PackedMsg &packedMsg) |
More... | |
Int64 | dispatch (Int64 timeOut=NoWaitEnum) |
More... | |
void | unregister (UInt64 handle) |
More... | |
void | submit (const AckMsg &ackMsg, UInt64 handle) |
More... | |
void | getConnectedClientChannelInfo (EmaVector< ChannelInformation > &) |
More... | |
void | getConnectedClientChannelStats (UInt64 clientHandle, ChannelStatistics &cs) |
More... | |
void | getChannelInformation (ChannelInformation &) |
More... | |
void | modifyIOCtl (Int32 code, Int32 value, UInt64 handle=0) |
More... | |
void | closeChannel (UInt64 clientHandle) |
More... | |
OmmProvider class provides interfaces for interactive and non interactive OmmProvider application use cases. The specific use case is determined through the usage of the respective OmmProvider class constructor.
The non interactive use case allows applications to publish items without any item request. In this case OmmProvider establishes and maintains the configured connection to ADH. Right after the connection is established, the application may start publishing item specific data while the app assigns unique handles or identifiers to each item.
The interactive use case works based on the item requests received from client applications. In this case OmmProvider establishes a server port to which clients connect. After clients login request is accepted, the provider application may receive item requests from the connected client application. The requested items are identified by the EMA with a unique handle or identifier. Provider application uses this handle to respond to the item requests.
OmmProvider provides a default behaviour / functionality. This may be tuned / modified by application when using OmmNiProviderConfig or OmmIProviderConfig.
Application interacts with ADH or clients through the OmmProvider interface methods. The results of these interactions are communicated back to application through OmmProviderClient and OmmProviderErrorClient.
The following code snippet shows basic usage of OmmProvider class in a simple non-interactive provider application.
The following code snippet shows basic usage of OmmProvider class in a simple interactive provider application.
Definition at line 162 of file OmmProvider.h.
Enumerator | |
---|---|
TimeoutEnum | no message was dispatch on this dispatch call |
DispatchedEnum | a message was dispatched on this dispatch call |
Definition at line 176 of file OmmProvider.h.
Enumerator | |
---|---|
InfiniteWaitEnum | dispatch blocks till a message arrives |
NoWaitEnum | dispatch exits immediately even if there is no message |
Definition at line 168 of file OmmProvider.h.
refinitiv::ema::access::OmmProvider::OmmProvider | ( | const OmmProviderConfig & | config | ) |
Create an OmmProvider with OmmNiProviderConfig. The OmmProvider enables functionality that includes non interactive distribution of item refresh, update, status and generic messages.
[in] | config | specifies instance of OmmNiProviderConfig |
refinitiv::ema::access::OmmProvider::OmmProvider | ( | const OmmProviderConfig & | config, |
OmmProviderClient & | client, | ||
void * | closure = 0 |
||
) |
Create an OmmProvider with OmmIProviderConfig. The OmmProvider enables functionality that includes interactive distribution of item refresh, update, status, generic and ack messages.
[in] | config | specifies instance of OmmIProviderConfig |
[in] | client | specifies instance of OmmProviderClient |
[in] | closure | specifies application defined identification |
refinitiv::ema::access::OmmProvider::OmmProvider | ( | const OmmProviderConfig & | config, |
OmmProviderErrorClient & | errorclient | ||
) |
Create an OmmProvider with OmmNiProviderConfig with an OmmProviderErrorClient that provides select global errors via callbacks instead of via exceptions.The OmmProvider enables functionality that includes non interactive distribution of item refresh, update, status and generic messages.
[in] | config | specifies instance of OmmNiProviderConfig |
[in] | errorClient | specifies instance of OmmProviderErrorClient |
refinitiv::ema::access::OmmProvider::OmmProvider | ( | const OmmProviderConfig & | config, |
OmmProviderClient & | client, | ||
OmmProviderErrorClient & | errorclient, | ||
void * | closure = 0 |
||
) |
Create an OmmProvider with OmmIProviderConfig with an OmmProviderErrorClient that provides select global errors via callbacks instead of via exceptions.The OmmProvider enables functionality that includes interactive distribution of item refresh, update, status, generic and ack messages.
[in] | config | specifies instance of OmmIProviderConfig |
[in] | client | specifies instance of OmmProviderClient |
[in] | errorClient | specifies instance of OmmProviderErrorClient |
[in] | closure | specifies application defined identification |
|
virtual |
Destructor.
void refinitiv::ema::access::OmmProvider::closeChannel | ( | UInt64 | clientHandle | ) |
Closes channel for connected client's channel and associated items. Only relevant to IProvider applications. This method throws an exception is called by NiProvider applications.
[in] | clientHandle | specifies a client handle to close its channel. |
OmmInvalidUsageException | if is called by an NiProvider application or an invalid client handle. |
Int64 refinitiv::ema::access::OmmProvider::dispatch | ( | Int64 | timeOut = NoWaitEnum | ) |
Relinquish application thread of control to receive callbacks via OmmProviderClient descendant.
[in] | time-out | specifies time in microseconds to wait in dispatch() for a message to dispatch |
OmmInvalidUsageException | if OperationalModel is not set to UserDispatchEnum |
void refinitiv::ema::access::OmmProvider::getChannelInformation | ( | ChannelInformation & | ) |
Provides channel information about the active channel. Only relevant to NiProvider application. This method throws an exception is called by IProvider applications.
[in] | caller | provider ChannelInformation&; parameter will be cleared and then current channel information will be provided |
OmmInvalidUsageException | if is called by an IProvider applications. |
void refinitiv::ema::access::OmmProvider::getConnectedClientChannelInfo | ( | EmaVector< ChannelInformation > & | ) |
Provides channel information about connected clients. Only relevant to IProvider applications. This method throws an exception is called by NiProvider applications.
[in] | caller | provided EmaVector<ChannelInformation>; vector will be cleared before channel information about connected clients is added |
OmmInvalidUsageException | if is called by an NiProvider application. |
void refinitiv::ema::access::OmmProvider::getConnectedClientChannelStats | ( | UInt64 | clientHandle, |
ChannelStatistics & | cs | ||
) |
Provides channel statistical information about connected client. Only relevant to IProvider applications. This method throws an exception is called by NiProvider applications.
[in] | clientHandleidentifies | handle associated with connected client information about connected clients is added |
[out] | cs | caller provided ChannelStatistics; data will be cleared before statistics information about connected clients is added |
OmmInvalidUsageException | if is called by an NiProvider application. |
const EmaString& refinitiv::ema::access::OmmProvider::getProviderName | ( | ) | const |
Retrieve internally generated OmmProvider instance name.
OmmProviderConfig::ProviderRole refinitiv::ema::access::OmmProvider::getProviderRole | ( | ) | const |
Retrieve Provider's role
void refinitiv::ema::access::OmmProvider::modifyIOCtl | ( | Int32 | code, |
Int32 | value, | ||
UInt64 | handle = 0 |
||
) |
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 |
[in] | identifies | handle associated with an item or login stream. This parameter is needed or IProvider applications only. |
OmmInvalidUsageException | if fails to modify I/O option to |
UInt64 refinitiv::ema::access::OmmProvider::registerClient | ( | const ReqMsg & | reqMsg, |
OmmProviderClient & | client, | ||
void * | closure = 0 |
||
) |
Opens an item stream (i.e. login stream and dictionary stream)
[in] | reqMsg | specifies item and its unique attributes |
[in] | client | specifies OmmProviderClient 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 ReqMsg |
OmmInvalidHandlException | if application passes invalid parent item handle |
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 |
Sends an AckMsg.
[in] | ackMsg | specifies AckMsg to be sent on the open item stream |
[in] | identifies | handle associated with an item stream on which to send the AckMsg |
OmmInvalidUsageException | if failed to submit ackMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
void refinitiv::ema::access::OmmProvider::submit | ( | const GenericMsg & | genericMsg, |
UInt64 | handle | ||
) |
Sends a GenericMsg.
[in] | genericMsg | specifies GenericMsg to be sent on the open item stream |
[in] | identifies | handle associated with an item stream on which to send the GenericMsg |
OmmInvalidUsageException | if failed to submit genericMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
void refinitiv::ema::access::OmmProvider::submit | ( | const PackedMsg & | packedMsg | ) |
Sends a PackedMsg.
[in] | packedMsg | specifies PackedMsg to be sent on the active channel |
OmmInvalidUsageException | if failed to submit packedMsg |
void refinitiv::ema::access::OmmProvider::submit | ( | const RefreshMsg & | refreshMsg, |
UInt64 | handle | ||
) |
Sends a RefreshMsg.
[in] | refreshMsg | specifies RefreshMsg to be sent |
[in] | identifies | handle associated with an item stream on which to send the RefreshMsg |
OmmInvalidUsageException | if failed to submit refreshMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
Sends a StatusMsg.
[in] | statusMsg | specifies StatusMsg to be sent |
[in] | identifies | handle associated with an item stream on which to send the StatusMsg |
OmmInvalidUsageException | if failed to submit statusMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
Sends a UpdateMsg.
[in] | updateMsg | specifies UpdateMsg to be sent |
[in] | identifies | handle associated with an item stream on which to send the UpdateMsg |
OmmInvalidUsageException | if failed to submit updateMsg |
OmmInvalidHandleException | if passed in handle does not refer to an open stream |
void refinitiv::ema::access::OmmProvider::unregister | ( | UInt64 | handle | ) |
Relinquishes interest in an open item stream if item handle is passed in. Closes server port if listener handle is passed in.
[in] | handle | identifies item or listener to close |
![]() |
![]() |
|