OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
Dequeue object for dequeuing messages into an Oracle Queue. More...
#include <types.hpp>
Inherits ocilib::core::HandleHolder< OCI_Dequeue * >.
Public Types | |
enum | DequeueModeValues { Browse = OCI_ADM_BROWSE , Locked = OCI_ADM_LOCKED , Remove = OCI_ADM_REMOVE , Confirm = OCI_ADM_REMOVE_NODATA } |
Dequeue mode enumerated values. More... | |
enum | DequeueVisibilityValues { Immediate = OCI_AMV_IMMEDIATE , OnCommit = OCI_AMV_ON_COMMIT } |
Message visibility enumerated values. More... | |
enum | NavigationModeValues { FirstMessage = OCI_ADN_FIRST_MSG , NextMessage = OCI_ADN_NEXT_MSG , NextTransaction = OCI_ADN_NEXT_TRANSACTION } |
Navigation Mode enumerated values. More... | |
typedef void(* | NotifyAQHandlerProc) (Dequeue &dequeue) |
User callback for dequeue event notifications. | |
typedef core::Enum< DequeueModeValues > | DequeueMode |
Dequeue mode. | |
typedef core::Enum< DequeueVisibilityValues > | DequeueVisibility |
Message visibility after begin dequeued. | |
typedef core::Enum< NavigationModeValues > | NavigationMode |
Navigation Mode. | |
Public Member Functions | |
Dequeue (const TypeInfo &typeInfo, const ostring &queueName) | |
Parametrized constructor. | |
Message | Get () |
Dequeue messages from the given queue. | |
Agent | Listen (int timeout) |
Listen for messages that match any recipient of the associated Agent list. | |
ostring | GetConsumer () const |
Get the current consumer name associated with the dequeuing process. | |
void | SetConsumer (const ostring &value) |
Set the current consumer name to retrieve message for. | |
ostring | GetCorrelation () const |
Get the correlation identifier of the message to be dequeued. | |
void | SetCorrelation (const ostring &value) |
set the correlation identifier of the message to be dequeued | |
Raw | GetRelativeMsgID () const |
Get the message identifier of the message to be dequeued. | |
void | SetRelativeMsgID (const Raw &value) |
Set the message identifier of the message to be dequeued. | |
DequeueVisibility | GetVisibility () const |
Get the dequeuing/locking behavior. | |
void | SetVisibility (DequeueVisibility value) |
Set whether the new message is dequeued as part of the current transaction. | |
DequeueMode | GetMode () const |
Get the dequeuing/locking behavior. | |
void | SetMode (DequeueMode value) |
Set the dequeuing/locking behavior. | |
NavigationMode | GetNavigation () const |
Return the navigation position of messages to retrieve from the queue. | |
void | SetNavigation (NavigationMode value) |
Set the position of messages to be retrieved. | |
int | GetWaitTime () const |
Return the time that Get() waits for messages if no messages are currently available. | |
void | SetWaitTime (int value) |
Set the time that Get() waits for messages if no messages are currently available. | |
void | SetAgents (std::vector< Agent > &agents) |
Set the Agent list to listen to message for. | |
void | Subscribe (unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler) |
Subscribe for asynchronous messages notifications. | |
void | Unsubscribe () |
Unsubscribe for asynchronous messages notifications. | |
Dequeue object for dequeuing messages into an Oracle Queue.
This class wraps the OCILIB object handle OCI_Dequeue and its related methods
ocilib::Dequeue::NotifyAQHandlerProc |
Dequeue mode.
Possible values are Dequeue::DequeueModeValues
Message visibility after begin dequeued.
Possible values are Dequeue::DequeueVisibilityValues
Navigation Mode.
Possible values are Dequeue::NavigationModeValues
Navigation Mode enumerated values.
Parametrized constructor.
typeInfo | - Payload type info |
queueName | - Queue name |
Definition at line 32 of file Dequeue.hpp.
References ocilib::core::Check(), ocilib::TypeInfo::GetConnection(), and OCI_DequeueCreate().
|
inline |
Dequeue messages from the given queue.
Definition at line 48 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueGet().
|
inline |
Listen for messages that match any recipient of the associated Agent list.
timeout | - Timeout in second |
Definition at line 53 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueListen().
|
inline |
Get the current consumer name associated with the dequeuing process.
Definition at line 58 of file Dequeue.hpp.
References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_DequeueGetConsumer().
|
inline |
Set the current consumer name to retrieve message for.
value | - consumer name |
Definition at line 63 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetConsumer().
|
inline |
Get the correlation identifier of the message to be dequeued.
Definition at line 68 of file Dequeue.hpp.
References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_DequeueGetCorrelation().
|
inline |
set the correlation identifier of the message to be dequeued
value | - correlation identifier |
Definition at line 73 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetCorrelation().
|
inline |
Get the message identifier of the message to be dequeued.
Definition at line 78 of file Dequeue.hpp.
References ocilib::core::Check(), ocilib::core::MakeRaw(), and OCI_DequeueGetRelativeMsgID().
|
inline |
Set the message identifier of the message to be dequeued.
value | - message identifier |
Definition at line 89 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetRelativeMsgID().
|
inline |
Get the dequeuing/locking behavior.
Definition at line 96 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueGetVisibility().
|
inline |
Set whether the new message is dequeued as part of the current transaction.
value | - dequeuing mode |
Definition at line 101 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetVisibility().
|
inline |
Get the dequeuing/locking behavior.
Definition at line 106 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueGetMode().
|
inline |
Set the dequeuing/locking behavior.
value | - dequeuing mode |
Definition at line 111 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetMode().
|
inline |
Return the navigation position of messages to retrieve from the queue.
Definition at line 116 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueGetNavigation().
|
inline |
Set the position of messages to be retrieved.
value | - navigation position |
Definition at line 121 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetNavigation().
|
inline |
Return the time that Get() waits for messages if no messages are currently available.
Definition at line 126 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueGetWaitTime().
|
inline |
Set the time that Get() waits for messages if no messages are currently available.
value | - timeout in seconds |
Definition at line 131 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetWaitTime().
|
inline |
Set the Agent list to listen to message for.
agents | - vector of agents |
Definition at line 136 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSetAgentList().
|
inline |
Subscribe for asynchronous messages notifications.
port | - Port to use for notifications |
timeout | - notification timeout |
handler | - User handler callback fired when messages are ready to be dequeued |
Definition at line 151 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueSubscribe().
|
inline |
Unsubscribe for asynchronous messages notifications.
Definition at line 158 of file Dequeue.hpp.
References ocilib::core::Check(), and OCI_DequeueUnsubscribe().