ocilib::Agent Class Reference

AQ identified agent for messages delivery. More...

`#include <ocilib.hpp>`

Inherits ocilib::HandleHolder< OCI_Agent *>.

## Public Member Functions

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

## Detailed Description

AQ identified agent for messages delivery.

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

Definition at line 7220 of file ocilib.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 6566 of file ocilib_impl.hpp.

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

## Member Function Documentation

## 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 6581 of file ocilib_impl.hpp.

References ocilib::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 6586 of file ocilib_impl.hpp.

References ocilib::Check(), ocilib::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 6591 of file ocilib_impl.hpp.

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