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.

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.