23 #include "ocilibcpp/types.hpp"
39 connection.GetHandle()
45 AcquireTransient(pMessage, parent);
54 inline Object Message::GetPayload<Object>()
60 inline void Message::SetPayload<Object>(
const Object &value)
66 inline Raw Message::GetPayload<Raw>()
68 unsigned int size = 0;
70 core::ManagedBuffer<unsigned char> buffer(
static_cast<size_t>(size + 1));
78 inline void Message::SetPayload<Raw>(
const Raw &value)
80 const AnyPointer data = value.empty() ? nullptr :
static_cast<AnyPointer>(
const_cast<Raw::value_type*
>(&value[0])) ;
102 unsigned int size = OCI_SIZE_BUFFER;
143 unsigned int size = OCI_SIZE_BUFFER;
154 const AnyPointer data = value.empty() ? nullptr :
static_cast<AnyPointer>(
const_cast<Raw::value_type*
>(&value[0])) ;
191 const size_t size = agents.size();
196 for (
size_t i = 0; i < size; ++i)
198 pAgents[i] =
static_cast<const Agent &
>(agents[i]);
AQ identified agent for messages delivery.
A connection or session with a specific database.
Object identifying the SQL data type DATE.
void SetCorrelation(const ostring &value)
Set the correlation identifier of the message.
void SetSender(const Agent &agent)
Set the original sender of the message.
int GetAttemptCount() const
Return the number of attempts that have been made to dequeue the message.
ostring GetExceptionQueue() const
Get the Exception queue name of the message.
void SetPriority(int value)
Set the priority of the message.
core::Enum< MessageStateValues > MessageState
Message state.
Raw GetOriginalID() const
Return the original ID of the message in the last queue that generated this message.
Date GetEnqueueTime() const
return the time the message was enqueued
MessageState GetState() const
Return the state of the message at the time of the dequeue.
void SetExpiration(int value)
set the duration that the message is available for dequeuing
Message(const TypeInfo &typeInfo)
Create a message object based on the given payload type.
Agent GetSender() const
Return the original sender of the message.
Raw GetID() const
Return the ID of the message.
void Reset()
Reset all attributes of the message.
ostring GetCorrelation() const
Get the correlation identifier of the message.
void SetEnqueueDelay(int value)
set the number of seconds to delay the enqueued message
int GetExpiration() const
Return the duration that the message is available for dequeuing.
int GetEnqueueDelay() const
Return the number of seconds that a message is delayed for dequeuing.
int GetPriority() const
Return the priority of the message.
void SetConsumers(std::vector< Agent > &agents)
Set the recipient list of a message to enqueue.
void SetOriginalID(const Raw &value)
Set the original ID of the message in the last queue that generated this message.
void SetExceptionQueue(const ostring &value)
Set the name of the queue to which the message is moved to if it cannot be processed successfully.
Object identifying the SQL data type OBJECT.
Provides type information on Oracle Database objects.
Connection GetConnection() const
Return the connection associated with a statement.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Internal usage. Interface for handling ownership and relationship of a C API handle.
Internal usage. Provide a buffer class with RAII capabilities.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgGetID(OCI_Msg *msg, void *id, unsigned int *len)
Return the ID of the message.
OCI_SYM_PUBLIC OCI_Msg *OCI_API OCI_MsgCreate(OCI_TypeInfo *typinf)
Create a message object based on the given payload type.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetPriority(OCI_Msg *msg, int value)
Set the priority of the message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetEnqueueDelay(OCI_Msg *msg, int value)
set the number of seconds to delay the enqueued message
OCI_SYM_PUBLIC const otext *OCI_API OCI_MsgGetExceptionQueue(OCI_Msg *msg)
Get the Exception queue name of the message.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_MsgGetObject(OCI_Msg *msg)
Get the object payload of the given message.
OCI_SYM_PUBLIC int OCI_API OCI_MsgGetAttemptCount(OCI_Msg *msg)
Return the number of attempts that have been made to dequeue the message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetCorrelation(OCI_Msg *msg, const otext *correlation)
set the correlation identifier of the message
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgReset(OCI_Msg *msg)
Reset all attributes of a message object.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetSender(OCI_Msg *msg, OCI_Agent *sender)
Set the original sender of a message.
OCI_SYM_PUBLIC OCI_Agent *OCI_API OCI_MsgGetSender(OCI_Msg *msg)
Return the original sender of a message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetExceptionQueue(OCI_Msg *msg, const otext *queue)
Set the name of the queue to which the message is moved to if it cannot be processed successfully.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetConsumers(OCI_Msg *msg, OCI_Agent **consumers, unsigned int count)
Set the recipient list of a message to enqueue.
OCI_SYM_PUBLIC int OCI_API OCI_MsgGetExpiration(OCI_Msg *msg)
Return the duration that the message is available for dequeuing.
OCI_SYM_PUBLIC const otext *OCI_API OCI_MsgGetCorrelation(OCI_Msg *msg)
Get the correlation identifier of the message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgGetRaw(OCI_Msg *msg, void *raw, unsigned int *size)
Get the RAW payload of the given message.
OCI_SYM_PUBLIC int OCI_API OCI_MsgGetPriority(OCI_Msg *msg)
Return the priority of the message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetOriginalID(OCI_Msg *msg, const void *id, unsigned int len)
Set the original ID of the message in the last queue that generated this message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgGetOriginalID(OCI_Msg *msg, void *id, unsigned int *len)
Return the original ID of the message in the last queue that generated this message.
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_MsgGetEnqueueTime(OCI_Msg *msg)
return the time the message was enqueued
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetExpiration(OCI_Msg *msg, int value)
set the duration that the message is available for dequeuing
OCI_SYM_PUBLIC int OCI_API OCI_MsgGetEnqueueDelay(OCI_Msg *msg)
Return the number of seconds that a message is delayed for dequeuing.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetObject(OCI_Msg *msg, OCI_Object *obj)
Set the object payload of the given message.
OCI_SYM_PUBLIC boolean OCI_API OCI_MsgSetRaw(OCI_Msg *msg, const void *raw, unsigned int size)
Set the RAW payload of the given message.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_MsgGetState(OCI_Msg *msg)
Return the state of the message at the time of the dequeue.
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
ostring MakeString(const otext *result, int size=-1)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
Raw MakeRaw(AnyPointer result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
std::basic_string< otext, std::char_traits< otext >, std::allocator< otext > > ostring
string class wrapping the OCILIB otext * type and OTEXT() macros ( see Character sets )
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
void * AnyPointer
Alias for the generic void pointer.