![]() |
OCILIB (C and C++ Driver for Oracle)
4.7.3
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
AQ message. More...
#include <types.hpp>
Inherits ocilib::core::HandleHolder< OCI_Msg *>.
Public Types | |
enum | MessageStateValues { Ready = OCI_AMS_READY, Waiting = OCI_AMS_WAITING, Processed = OCI_AMS_PROCESSED, Expired = OCI_AMS_EXPIRED } |
Message state enumerated values. More... | |
typedef core::Enum< MessageStateValues > | MessageState |
Message state. More... | |
Public Member Functions | |
Message (const TypeInfo &typeInfo) | |
Create a message object based on the given payload type. More... | |
void | Reset () |
Reset all attributes of the message. More... | |
template<class T > | |
T | GetPayload () |
Get the object payload of the message. | |
template<class T > | |
void | SetPayload (const T &value) |
Set the object payload of the message. More... | |
Date | GetEnqueueTime () const |
return the time the message was enqueued More... | |
int | GetAttemptCount () const |
Return the number of attempts that have been made to dequeue the message. | |
MessageState | GetState () const |
Return the state of the message at the time of the dequeue. | |
Raw | GetID () const |
Return the ID of the message. More... | |
int | GetExpiration () const |
Return the duration that the message is available for dequeuing. More... | |
void | SetExpiration (int value) |
set the duration that the message is available for dequeuing More... | |
int | GetEnqueueDelay () const |
Return the number of seconds that a message is delayed for dequeuing. More... | |
void | SetEnqueueDelay (int value) |
set the number of seconds to delay the enqueued message More... | |
int | GetPriority () const |
Return the priority of the message. More... | |
void | SetPriority (int value) |
Set the priority of the message. More... | |
Raw | GetOriginalID () const |
Return the original ID of the message in the last queue that generated this message. More... | |
void | SetOriginalID (const Raw &value) |
Set the original ID of the message in the last queue that generated this message. More... | |
ostring | GetCorrelation () const |
Get the correlation identifier of the message. More... | |
void | SetCorrelation (const ostring &value) |
Set the correlation identifier of the message. More... | |
ostring | GetExceptionQueue () const |
Get the Exception queue name of the message. More... | |
void | SetExceptionQueue (const ostring &value) |
Set the name of the queue to which the message is moved to if it cannot be processed successfully. More... | |
Agent | GetSender () const |
Return the original sender of the message. More... | |
void | SetSender (const Agent &agent) |
Set the original sender of the message. More... | |
void | SetConsumers (std::vector< Agent > &agents) |
Set the recipient list of a message to enqueue. More... | |
AQ message.
This class wraps the OCILIB object handle OCI_Msg and its related methods
Message state.
Possible values are Message::MessageStateValues
|
inline |
Create a message object based on the given payload type.
typeInfo | - Type info object |
Definition at line 32 of file Message.hpp.
References ocilib::core::Check(), OCI_MsgCreate(), and OCI_MsgFree().
|
inline |
Reset all attributes of the message.
Definition at line 42 of file Message.hpp.
References ocilib::core::Check(), ocilib::core::MakeRaw(), OCI_MsgGetObject(), OCI_MsgGetRaw(), OCI_MsgReset(), OCI_MsgSetObject(), and OCI_MsgSetRaw().
void ocilib::Message::SetPayload | ( | const T & | value | ) |
Set the object payload of the message.
value | - Object payload |
|
inline |
return the time the message was enqueued
Definition at line 79 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgGetEnqueueTime().
|
inline |
Return the ID of the message.
Definition at line 94 of file Message.hpp.
References ocilib::core::Check(), ocilib::core::MakeRaw(), and OCI_MsgGetID().
|
inline |
Return the duration that the message is available for dequeuing.
Definition at line 105 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgGetExpiration().
|
inline |
set the duration that the message is available for dequeuing
value | - duration in seconds |
Definition at line 110 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetExpiration().
|
inline |
Return the number of seconds that a message is delayed for dequeuing.
Definition at line 115 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgGetEnqueueDelay().
|
inline |
set the number of seconds to delay the enqueued message
value | - Delay in seconds |
Definition at line 120 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetEnqueueDelay().
|
inline |
Return the priority of the message.
Definition at line 125 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgGetPriority().
|
inline |
Set the priority of the message.
value | - Message priority |
Definition at line 130 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetPriority().
|
inline |
Return the original ID of the message in the last queue that generated this message.
Definition at line 135 of file Message.hpp.
References ocilib::core::Check(), ocilib::core::MakeRaw(), and OCI_MsgGetOriginalID().
|
inline |
Set the original ID of the message in the last queue that generated this message.
value | - Message ID |
Definition at line 146 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetOriginalID().
|
inline |
Get the correlation identifier of the message.
Definition at line 153 of file Message.hpp.
References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_MsgGetCorrelation().
|
inline |
Set the correlation identifier of the message.
value | - Message correlation text |
Definition at line 158 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetCorrelation().
|
inline |
Get the Exception queue name of the message.
Definition at line 163 of file Message.hpp.
References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_MsgGetExceptionQueue().
|
inline |
Set the name of the queue to which the message is moved to if it cannot be processed successfully.
value | - Exception queue name |
"Messages are moved into exception queues in two cases :
All messages in the exception queue are in the EXPIRED state.
The default is the exception queue associated with the queue table.
If the exception queue specified does not exist at the time of the move the message will be moved to the default exception queue associated with the queue table and a warning will be logged in the alert file.
This attribute must refer to a valid queue name."
Definition at line 168 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetExceptionQueue().
|
inline |
Return the original sender of the message.
Definition at line 173 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgGetSender().
|
inline |
Set the original sender of the message.
agent | - Message sender |
Definition at line 178 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetSender().
|
inline |
Set the recipient list of a message to enqueue.
agents | - Recipients list |
Definition at line 183 of file Message.hpp.
References ocilib::core::Check(), and OCI_MsgSetConsumers().