| Oracle® C++ Call Interface Programmer's Guide 10g Release 1 (10.1) Part Number B10778-01  | 
  | 
  | 
View PDF | 
The Agent class represents an agent in the Advanced Queuing context.
Table 10-2 Summary of Agent Methods
| Method | Summary | 
|---|---|
| Agent() | 
Agent class constructor. | 
| getAddress() | 
Return the address of the Agent. | 
| getName() | 
Return the name of the Agent. | 
| getProtocol() | 
Return the protocol of the Agent. | 
| isNull() | 
Test whether the Agent object is NULL. | 
| setAddress() | 
Set address of the Agent object. | 
| setName() | 
Set name of the Agent object. | 
| setNull() | 
Set Agent object to NULL. | 
| setProtocol() | 
Set protocol of the Agent object. | 
Agent class constructor.
| Syntax | Description | 
|---|---|
Agent( Environment *env);  | 
Creates an Agent object initialized to its default values. | 
Agent( Environment *env, const string& name, const string& address, unsigned int protocol = 0);  | 
Creates an Agent object with specified Agent's name, address, and protocol. | 
| Parameter | Description | 
|---|---|
env  | 
Environment | 
name  | 
Name | 
address  | 
Address | 
protocol  | 
Protocol | 
Returns a string containing Agent's address.
string getAddress() const;
Returns a string containing Agent's name.
string getName() const;
Returns a numeric code representing Agent's protocol.
unsigned int getProtocol();
Tests whether the Agent object is NULL. If the Agent object is NULL, then TRUE is returned; otherwise, FALSE is returned.
bool isNull();
Set the address of the Agent object.
void setAddress( const string& address);
| Parameter | Description | 
|---|---|
address  | 
The name of the Agent object. | 
Set the name of the Agent object.
void setName( const string& name);
| Parameter | Description | 
|---|---|
name  | 
The name of the Agent object. | 
Sets the Agent object to NULL. Unless operating in an inner scope, this call should be made before terminating the Connection used to create this Agent.
void setNull();
Set the protocol of the Agent object.
void setProtocol( unsigned int protocol = 0);
| Parameter | Description | 
|---|---|
protocol  | 
The protocol of the Agent object. |