OCILIB (C and C++ Driver for Oracle)
4.6.3
|
AQ message. More...
#include <ocilib.hpp>
Inherits ocilib::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 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
Definition at line 7552 of file ocilib.hpp.
Message state.
Possible values are Message::MessageStateValues
Definition at line 7582 of file ocilib.hpp.
Message state enumerated values.
Enumerator | |
---|---|
Ready | The message is ready to be processed |
Waiting | The message delay has not yet completed |
Processed | The message has been processed |
Expired | The message has moved to exception queue |
Definition at line 7563 of file ocilib.hpp.
|
inline |
Create a message object based on the given payload type.
typeInfo | - Type info object |
Definition at line 6772 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_MsgCreate(), and OCI_MsgFree().
|
inline |
Reset all attributes of the message.
Definition at line 6782 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::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 6824 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgGetEnqueueTime().
|
inline |
Return the ID of the message.
Definition at line 6839 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::MakeRaw(), and OCI_MsgGetID().
|
inline |
Return the duration that the message is available for dequeuing.
Definition at line 6850 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgGetExpiration().
|
inline |
set the duration that the message is available for dequeuing
value | - duration in seconds |
Definition at line 6855 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetExpiration().
|
inline |
Return the number of seconds that a message is delayed for dequeuing.
Definition at line 6860 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgGetEnqueueDelay().
|
inline |
set the number of seconds to delay the enqueued message
value | - Delay in seconds |
Definition at line 6865 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetEnqueueDelay().
|
inline |
Return the priority of the message.
Definition at line 6870 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgGetPriority().
|
inline |
Set the priority of the message.
value | - Message priority |
Definition at line 6875 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetPriority().
|
inline |
Return the original ID of the message in the last queue that generated this message.
Definition at line 6880 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::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 6891 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetOriginalID().
|
inline |
Get the correlation identifier of the message.
Definition at line 6903 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::MakeString(), and OCI_MsgGetCorrelation().
|
inline |
Set the correlation identifier of the message.
value | - Message correlation text |
Definition at line 6908 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetCorrelation().
|
inline |
Get the Exception queue name of the message.
Definition at line 6913 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::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 6918 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetExceptionQueue().
|
inline |
Return the original sender of the message.
Definition at line 6923 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgGetSender().
|
inline |
Set the original sender of the message.
agent | - Message sender |
Definition at line 6928 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetSender().
|
inline |
Set the recipient list of a message to enqueue.
agents | - Recipients list |
Definition at line 6933 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_MsgSetConsumers().