Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2.0.2) Part Number E18754-01 |
|
|
PDF · Mobi · ePub |
The OracleAQAgent
class represents agents that may be senders or recipients of a message.
System.Object
OracleAQAgent
// C# public sealed class OracleAQAgent
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
An agent may be a consumer, another queue, or a consumer of another queue. The queue may be either local or remote. A remote queue is specified through a database link.
Namespace: Oracle.DataAccess.Client
Assembly: Oracle.DataAccess.dll
ODP.NET Version: ODP.NET for .NET Framework 2.0 or ODP.NET for .NET Framework 4
See Also:
OracleAQAgent
members are listed in the following tables.
OracleAQAgent
constructors are listed in Table 12-1.
Table 12-1 OracleAQAgent Constructors
Constructor | Description |
---|---|
Instantiates a new instance of the |
OracleAQAgent
properties are listed in Table 12-2.
Table 12-2 OracleAQAgent Properties
Property | Description |
---|---|
Specifies the address of the agent. |
|
Specifies the name of the agent. |
OracleAQAgent
constructors instantiate new instances of the OracleAQAgent
class.
This constructor instantiates the OracleAQAgent
class using the specified name.
OracleAQAgent (string, string)
This constructor instantiates the OracleAQAgent
class using the specified name and address.
This constructor instantiates the OracleAQAgent
class using the specified name.
// C#
public OracleAQAgent(string name);
name
The name of the agent.
ArgumentNullException
- The name
parameter is null
.
ArgumentException
- The name
parameter is empty.
The agent name signifies the name of a producer or consumer of a message. In the context of functionality exposed by Listen
, an agent name corresponds to the name of a consumer for which a message is expected on a multiconsumer queue. It may also be set on a message to signify sender identification or intended recipients of the message.
This constructor instantiates the OracleAQAgent
class using the specified name and address.
// C# public OracleAQAgent(string name, string address);
name
The name of the agent.
address
The address is of the form [schema.
]queue
[@
dblink
].
ArgumentNullException
- The address
parameter is null.
ArgumentException
- The address
parameter is empty.
The agent name signifies the name of a producer or consumer of a message. In the context of functionality exposed by Listen
, an agent name corresponds to the name of a consumer for which a message is expected on a multiconsumer queue.
The name
parameter can be specified as null
in this constructor. In such a scenario, the agent only has an address
.
The address
parameter signifies the name of the queue against which this agent listens for new messages. The address
represents a queue at a local or remote database.The validity of the address
is not checked implicitly. The exceptions due to wrong address
are thrown only during database operations such as Listen
.
OracleAQAgent
properties are listed in Table 12-3.
Table 12-3 OracleAQAgent Properties
Property | Description |
---|---|
Specifies the address of the agent. |
|
Specifies the name of the agent. |
This instance property specifies the address of the agent.
// C# public string Address {get; }
A string
that specifies the agent address.
The address represents a queue at a local or remote database. The default value is null
. The address of the agent is of the form [schema.
]queue
[@
dblink
]. The string length can be up to 128 characters.
This instance property specifies the name of the agent.
// C# public string Name {get; }
A string
.
The default is null
. The string length can be up to 30 characters. A non-null
value implies that this agent name either corresponds to a consumer name in a multiconsumer queue, or a recipient as specified in message properties.