23 #include "ocilibcpp/types.hpp" 39 Acquire(pDequeue,
nullptr,
nullptr,
nullptr);
74 unsigned int size = OCI_SIZE_BUFFER;
85 const AnyPointer data = value.empty() ? nullptr :
static_cast<AnyPointer>(
const_cast<Raw::value_type*
>(&value[0])) ;
132 const size_t size = agents.size();
137 for (
size_t i = 0; i < size; ++i)
139 pAgents[i] =
static_cast<const Agent &
>(agents[i]);
149 Environment::SetUserCallback<NotifyAQHandlerProc>(
static_cast<OCI_Dequeue*
>(*this), handler);
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
Agent Listen(int timeout)
Listen for messages that match any recipient of the associated Agent list.
void(* NotifyAQHandlerProc)(Dequeue &dequeue)
User callback for dequeue event notifications.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueFree(OCI_Dequeue *dequeue)
Free a Dequeue object.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSubscribe(OCI_Dequeue *dequeue, unsigned int port, unsigned int timeout, POCI_NOTIFY_AQ callback)
Subscribe for asynchronous messages notifications.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetAgentList(OCI_Dequeue *dequeue, OCI_Agent **consumers, unsigned int count)
Set the Agent list to listen to message for.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetCorrelation(OCI_Dequeue *dequeue, const otext *pattern)
set the correlation identifier of the message to be dequeued
OCI_SYM_PUBLIC OCI_Msg *OCI_API OCI_DequeueGet(OCI_Dequeue *dequeue)
Dequeue messages from the given queue.
Raw MakeRaw(AnyPointer result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
core::Enum< DequeueModeValues > DequeueMode
Dequeue mode.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DequeueGetMode(OCI_Dequeue *dequeue)
Get the dequeuing/locking behavior.
DequeueVisibility GetVisibility() const
Get the dequeuing/locking behavior.
NavigationMode GetNavigation() const
Return the navigation position of messages to retrieve from the queue.
OCI_SYM_PUBLIC const otext *OCI_API OCI_DequeueGetConsumer(OCI_Dequeue *dequeue)
Get the current consumer name associated with the dequeuing process.
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so, it raises a C++ exception using the retrieved error handle.
OCI_SYM_PUBLIC OCI_Agent *OCI_API OCI_DequeueListen(OCI_Dequeue *dequeue, int timeout)
Listen for messages that match any recipient of the associated Agent list.
AQ identified agent for messages delivery.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DequeueGetVisibility(OCI_Dequeue *dequeue)
Get the dequeuing/locking behavior.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueGetRelativeMsgID(OCI_Dequeue *dequeue, void *id, unsigned int *len)
Get the message identifier of the message to be dequeued.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetNavigation(OCI_Dequeue *dequeue, unsigned int position)
Set the position of messages to be retrieved.
void SetConsumer(const ostring &value)
Set the current consumer name to retrieve message for.
ostring MakeString(const otext *result, int size=-1)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetConsumer(OCI_Dequeue *dequeue, const otext *consumer)
Set the current consumer name to retrieve message for.
ostring GetConsumer() const
Get the current consumer name associated with the dequeuing process.
core::Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
OCI_SYM_PUBLIC const otext *OCI_API OCI_DequeueGetCorrelation(OCI_Dequeue *dequeue)
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
Message Get()
Dequeue messages from the given queue.
void SetRelativeMsgID(const Raw &value)
Set the message identifier of the message to be dequeued.
void SetAgents(std::vector< Agent > &agents)
Set the Agent list to listen to message for.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetMode(OCI_Dequeue *dequeue, unsigned int mode)
Set the dequeuing/locking behavior.
void * AnyPointer
Alias for the generic void pointer.
void Subscribe(unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler)
Subscribe for asynchronous messages notifications.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
OCI_SYM_PUBLIC int OCI_API OCI_DequeueGetWaitTime(OCI_Dequeue *dequeue)
Return the time that OCIDequeueGet() waits for messages if no messages are currently available...
Internal usage. Provide a buffer class with RAII capabilities.
void SetMode(DequeueMode value)
Set the dequeuing/locking behavior.
OCI_SYM_PUBLIC OCI_Dequeue *OCI_API OCI_DequeueCreate(OCI_TypeInfo *typinf, const otext *name)
Create a Dequeue object for the given queue.
void SetVisibility(DequeueVisibility value)
Set whether the new message is dequeued as part of the current transaction.
Dequeue(const TypeInfo &typeInfo, const ostring &queueName)
Parametrized constructor.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetVisibility(OCI_Dequeue *dequeue, unsigned int visibility)
Set whether the new message is dequeued as part of the current transaction.
DequeueMode GetMode() const
Get the dequeuing/locking behavior.
core::Enum< NavigationModeValues > NavigationMode
Navigation Mode.
void Unsubscribe()
Unsubscribe for asynchronous messages notifications.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetRelativeMsgID(OCI_Dequeue *dequeue, const void *id, unsigned int len)
Set the message identifier of the message to be dequeued.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
void SetWaitTime(int value)
Set the time that Get() waits for messages if no messages are currently available.
Provides type information on Oracle Database objects.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DequeueGetNavigation(OCI_Dequeue *dequeue)
Return the navigation position of messages to retrieve from the queue.
ostring GetCorrelation() const
Get the correlation identifier of the message to be dequeued.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueUnsubscribe(OCI_Dequeue *dequeue)
Unsubscribe for asynchronous messages notifications.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetWaitTime(OCI_Dequeue *dequeue, int timeout)
set the time that OCIDequeueGet() waits for messages if no messages are currently available ...
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 ) ...
int GetWaitTime() const
Return the time that Get() waits for messages if no messages are currently available.
Raw GetRelativeMsgID() const
Get the message identifier of the message to be dequeued.
void SetNavigation(NavigationMode value)
Set the position of messages to be retrieved.