OCILIB (C and C++ Driver for Oracle)  4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
ocilib::Agent Class Reference

AQ identified agent for messages delivery. More...

#include <types.hpp>

Inherits ocilib::core::HandleHolder< OCI_Agent * >.

Public Member Functions

 Agent (const Connection &connection, const ostring &name=OTEXT(""), const ostring &address=OTEXT(""))
 Create an AQ agent object.
 
ostring GetName () const
 Get the given AQ agent name.
 
void SetName (const ostring &value)
 Set the given AQ agent name.
 
ostring GetAddress () const
 Get the given AQ agent address.
 
void SetAddress (const ostring &value)
 Set the given AQ agent address.
 

Detailed Description

AQ identified agent for messages delivery.

This class wraps the OCILIB object handle OCI_Agent and its related methods

Definition at line 7328 of file types.hpp.

Constructor & Destructor Documentation

◆ Agent()

ocilib::Agent::Agent ( const Connection connection,
const ostring name = OTEXT(""),
const ostring address = OTEXT("") 
)
inline

Create an AQ agent object.

Parameters
connection- Connection object
name- Agent name
address- Agent address
Note
An AQ agent object is :
  • used as recipient information when enqueuing a message
  • used as sender information when dequeuing a message
  • used for listening message only from identified senders
the AQ agent address can be any Oracle identifier, up to 128 bytes. the AQ agent name can be any Oracle identifier, up to 30 bytes.
the Agent object must not be accessed anymore once the parent connection object gets out of scope

Definition at line 28 of file Agent.hpp.

References ocilib::core::Check(), and OCI_AgentCreate().

Member Function Documentation

◆ GetName()

ostring ocilib::Agent::GetName ( ) const
inline

Get the given AQ agent name.

Definition at line 42 of file Agent.hpp.

References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_AgentGetName().

◆ SetName()

void ocilib::Agent::SetName ( const ostring value)
inline

Set the given AQ agent name.

Parameters
value- AQ agent name
Note
the AQ agent name is used to identified an message send or recipient when enqueuing/dequeuing a message
the AQ agent name can be any Oracle identifier, up to 30 bytes.

Definition at line 47 of file Agent.hpp.

References ocilib::core::Check(), and OCI_AgentSetName().

◆ GetAddress()

ostring ocilib::Agent::GetAddress ( ) const
inline

Get the given AQ agent address.

Note
See SetAddress() for more details

Definition at line 52 of file Agent.hpp.

References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_AgentGetAddress().

◆ SetAddress()

void ocilib::Agent::SetAddress ( const ostring value)
inline

Set the given AQ agent address.

Parameters
value- AQ agent address
Note
the parameter 'address' must be of the form : [schema.]queue_name[@dblink]
the AQ agent address can be any Oracle identifier, up to 128 bytes.

Definition at line 57 of file Agent.hpp.

References ocilib::core::Check(), and OCI_AgentSetAddress().