Agent Class
The Agent class represents an agent in the Advanced Queuing context.
Table 13-3 Summary of Agent Methods
| Method | Summary |
|---|---|
|
|
|
|
Returns the address of the |
|
|
Returns the name of the |
|
|
Returns the protocol of the |
|
|
Tests whether the |
|
|
Assignment operator for |
|
|
Sets address of the |
|
|
Sets name of the |
|
|
Sets |
|
|
Sets protocol of the |
- Agent()
- getAddress()
- getName()
- getProtocol()
- isNull()
- operator=()
- setAddress()
- setName()
- setNull()
- setProtocol()
Parent topic: OCCI Application Programming Interface
Agent()
Agent class constructor.
| Syntax | Description |
|---|---|
Agent( const Environment *env); |
Creates an |
Agent( const Agent& agent); |
Copy constructor. |
Agent( const Environment *env, const string& name, const string& address, unsigned int protocol = 0); |
Creates an |
| Parameter | Description |
|---|---|
env |
Environment |
name |
Name |
agent |
Original agent |
address |
Address |
protocol |
Protocol |
Parent topic: Agent Class
getAddress()
Returns a string containing Agent's address.
Syntax
string getAddress() const;
Parent topic: Agent Class
getName()
Returns a string containing Agent's name.
Syntax
string getName() const;
Parent topic: Agent Class
getProtocol()
Returns a numeric code representing Agent's protocol.
Syntax
unsigned int getProtocol() const;
Parent topic: Agent Class
isNull()
Tests whether the Agent object is NULL. If the Agent object is NULL, then TRUE is returned; otherwise, FALSE is returned.
Syntax
bool isNull() const;
Parent topic: Agent Class
operator=()
Assignment operator for Agent class.
Syntax
void operator=( const Agent& agent);
| Parameter | Description |
|---|---|
agent |
The original |
Parent topic: Agent Class
setAddress()
Sets the address of the Agent object.
Syntax
void setAddress( const string& addr);
| Parameter | Description |
|---|---|
addr |
The name of the |
Parent topic: Agent Class
setName()
Sets the name of the Agent object.
Syntax
void setName( const string& name);
| Parameter | Description |
|---|---|
name |
The name of the |
Parent topic: Agent Class
setNull()
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.
Syntax
void setNull();
Parent topic: Agent Class
setProtocol()
Sets the protocol of the Agent object.
Syntax
void setProtocol( unsigned int protocol = 0);
| Parameter | Description |
|---|---|
protocol |
The protocol of the |
Parent topic: Agent Class