23 #include "ocilibcpp/types.hpp"
39 connection.GetHandle()
45 AcquireTransient(pDequeue,parent);
80 unsigned int size = OCI_SIZE_BUFFER;
91 const AnyPointer data = value.empty() ? nullptr :
static_cast<AnyPointer>(
const_cast<Raw::value_type*
>(&value[0])) ;
138 const size_t size = agents.size();
143 for (
size_t i = 0; i < size; ++i)
145 pAgents[i] =
static_cast<const Agent &
>(agents[i]);
155 Environment::SetUserCallback<NotifyAQHandlerProc>(
static_cast<OCI_Dequeue*
>(*
this), handler);
AQ identified agent for messages delivery.
A connection or session with a specific database.
Agent Listen(int timeout)
Listen for messages that match any recipient of the associated Agent list.
Message Get()
Dequeue messages from the given queue.
int GetWaitTime() const
Return the time that Get() waits for messages if no messages are currently available.
ostring GetCorrelation() const
Get the correlation identifier of the message to be dequeued.
DequeueVisibility GetVisibility() const
Get the dequeuing/locking behavior.
void Unsubscribe()
Unsubscribe for asynchronous messages notifications.
void Subscribe(unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler)
Subscribe for asynchronous messages notifications.
DequeueMode GetMode() const
Get the dequeuing/locking behavior.
void SetAgents(std::vector< Agent > &agents)
Set the Agent list to listen to message for.
ostring GetConsumer() const
Get the current consumer name associated with the dequeuing process.
core::Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
void SetConsumer(const ostring &value)
Set the current consumer name to retrieve message for.
void SetRelativeMsgID(const Raw &value)
Set the message identifier of the message to be dequeued.
void SetMode(DequeueMode value)
Set the dequeuing/locking behavior.
void SetCorrelation(const ostring &value)
set the correlation identifier of the message to be dequeued
Dequeue(const TypeInfo &typeInfo, const ostring &queueName)
Parametrized constructor.
void SetVisibility(DequeueVisibility value)
Set whether the new message is dequeued as part of the current transaction.
core::Enum< DequeueModeValues > DequeueMode
Dequeue mode.
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.
Raw GetRelativeMsgID() const
Get the message identifier of the message to be dequeued.
void SetWaitTime(int value)
Set the time that Get() waits for messages if no messages are currently available.
core::Enum< NavigationModeValues > NavigationMode
Navigation Mode.
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 unsigned int OCI_API OCI_DequeueGetNavigation(OCI_Dequeue *dequeue)
Return the navigation position of messages to retrieve from the queue.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DequeueGetVisibility(OCI_Dequeue *dequeue)
Get the dequeuing/locking behavior.
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.
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.
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 const otext *OCI_API OCI_DequeueGetCorrelation(OCI_Dequeue *dequeue)
Get the correlation identifier of the message to be dequeued.
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 const otext *OCI_API OCI_DequeueGetConsumer(OCI_Dequeue *dequeue)
Get the current consumer name associated with the dequeuing process.
OCI_SYM_PUBLIC OCI_Msg *OCI_API OCI_DequeueGet(OCI_Dequeue *dequeue)
Dequeue messages from the given queue.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueUnsubscribe(OCI_Dequeue *dequeue)
Unsubscribe for asynchronous messages notifications.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DequeueGetMode(OCI_Dequeue *dequeue)
Get the dequeuing/locking behavior.
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.
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.
OCI_SYM_PUBLIC OCI_Dequeue *OCI_API OCI_DequeueCreate(OCI_TypeInfo *typinf, const otext *name)
Create a Dequeue object for the given queue.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetConsumer(OCI_Dequeue *dequeue, const otext *consumer)
Set the current consumer name to retrieve message for.
OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetMode(OCI_Dequeue *dequeue, unsigned int mode)
Set the dequeuing/locking behavior.
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_DequeueSetCorrelation(OCI_Dequeue *dequeue, const otext *pattern)
set the correlation 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.
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
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
void(* POCI_NOTIFY_AQ)(OCI_Dequeue *dequeue)
AQ notification callback prototype.
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.