TibrvListener::create()

Method

Declaration

TibrvStatus create (
    TibrvQueue* queue,
    TibrvCallback* callback,
    TibrvTransport* transport,
    const char* subject,
    const void* closure = NULL);

Purpose

Listen for inbound messages.

Remarks

This method creates a C listener and stores its handle in the C++ object.

Parameter

Description

queue

For each inbound message, place the event on this event queue.

callback

On dispatch, process the event with this callback object.

This object can be an instance of class TibrvMsgCallback, or its superclass TibrvCallback.

transport

Listen for inbound messages on this transport.

subject

Listen for inbound messages with subjects that match this specification. Wildcard subjects are permitted. The empty string is not a legal subject name.

closure

Store this closure data in the event object.

Listening for Advisory Messages

Use this method to listen for advisory subjects. We recommend sending advisory message events to the default queue.

Inbox Listener

To receive unicast (point-to-point) messages, listen to an inbox subject name. First call TibrvTransport::createInbox() to create the unique inbox name; then call TibrvListener::create() to begin listening. Remember that other programs have no information about an inbox until the listening program uses it as a reply subject in an outbound message. See also, Inbox Names in TIBCO Rendezvous Concepts.

See Also

TibrvListener::getSubject()

TibrvTransport::createInbox()