Skip Headers
Oracle® Data Provider for .NET Developer's Guide
12c Release 1 (12.1.0.1.0)

Part Number E41125-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

OracleAQAgent Class

The OracleAQAgent class represents agents that may be senders or recipients of a message.

Class Inheritance

System.Object

  OracleAQAgent

Declaration

// C#
public sealed class OracleAQAgent

Requirements

Provider ODP.NET, Unmanaged Driver
Assembly Oracle.DataAccess.dll
Namespace Oracle.DataAccess.Client
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5

Thread Safety

All public static methods are thread-safe, although instance methods do not guarantee thread safety.

Remarks

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.


OracleAQAgent Members

OracleAQAgent members are listed in the following tables.

OracleAQAgent Constructors

OracleAQAgent constructors are listed in Table 12-1.

Table 12-1 OracleAQAgent Constructors

Constructor Description

OracleAQAgent Constructors

Instantiates a new instance of the OracleAQAgent class (Overloaded).


OracleAQAgent Properties

OracleAQAgent properties are listed in Table 12-2.

Table 12-2 OracleAQAgent Properties

Property Description

Address

Specifies the address of the agent.

Name

Specifies the name of the agent.



OracleAQAgent Constructors

OracleAQAgent constructors instantiate new instances of the OracleAQAgent class.

Overload List:

OracleAQAgent (string)

This constructor instantiates the OracleAQAgent class using the specified name.

Declaration

// C#
public OracleAQAgent(string name);

Parameters

  • name

    The name of the agent.

Exceptions

ArgumentNullException - The name parameter is null.

ArgumentException - The name parameter is empty.

Remarks

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.

OracleAQAgent (string, string)

This constructor instantiates the OracleAQAgent class using the specified name and address.

Declaration

// C#
public OracleAQAgent(string name, string address);

Parameters

  • name

    The name of the agent.

  • address

    The address is of the form [schema.]queue[@dblink].

Exceptions

ArgumentNullException - The address parameter is null.

ArgumentException - The address parameter is empty.

Remarks

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

OracleAQAgent properties are listed in Table 12-3.

Table 12-3 OracleAQAgent Properties

Property Description

Address

Specifies the address of the agent.

Name

Specifies the name of the agent.


Address

This instance property specifies the address of the agent.

Declaration

// C#
public string Address {get; }

Property Value

A string that specifies the agent address.

Remarks

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.

Name

This instance property specifies the name of the agent.

Declaration

// C#
public string Name {get; }

Property Value

A string.

Remarks

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.