Skip Headers
Oracle® C++ Call Interface Programmer's Guide,
11g Release 2 (11.2)

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

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

Listener Class

The Listener class encapsulates the ability to listen for Messages, on behalf of registered Agents, at specified queues.

LNCPP21114Table 13-23 Summary of Listener Methods

Method Summary

Listener()

Listener class constructor.

getAgentList()

Retrieves the list of Agents for which the Listener provides its services.

getTimeOutForListen()

Retrieves the time out for a call.

listen()

Listens for Messages and returns the name of the Agent for whom a Message is intended.

setAgentList()

Specifies the list of Agents for which the Listener provides its services.

setTimeOutForListen()

Specifies the time out for a listen() call.


LNCPP21115

Listener()

Listener class constructor.

Syntax Description
Listener(
   const Connection* conn);
Creates a Listener object.
Listener(
   const Connection* conn
   vector<Agent> &aglist,
   int waitTime=0);
Creates a Listener object and sets the list of Agents on behalf of which it listens on queues. Also sets the waiting time; default: no waiting.

Parameter Description
conn
The connection of the new Listener object.
aglist
The list of agents on behalf of which the Listener object waits on queues; clients of this Listener.
waitTime
The time to wait on queues for messages of interest for the clients; in seconds.

LNCPP21116

getAgentList()

Retrieves the list of Agents for which the Listener provides its services.

LNCPP21117Syntax

vector<Agent> getAgentList() const;
LNCPP21118

getTimeOutForListen()

Retrieves the time out for a call.

LNCPP21119Syntax

int getTimeOutForListen() const;
LNCPP21120

listen()

Listens for Messages on behalf of specified Agents for the amount of time specified by a previous setTimeOutForListen() call. Returns the Agent for which there is a Message.

Note that this is a blocking call. Before this call, complete the following steps:

LNCPP21121Syntax

Agent listen();
LNCPP21122

setAgentList()

Specifies the list of Agents for which the Listener provides its services.

LNCPP21123Syntax

void setAgentList(
   vector<Agent>& agList);
Parameter Description
agList
The list of Agents.

LNCPP21124

setTimeOutForListen()

Specifies the time out for a listen() call.

LNCPP21125Syntax

void setTimeOutForListen(
   int waitTime);
Parameter Description
waitTime
The time interval, in seconds, during which the Listener is waiting for Messages at specified queues.

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF