An application uses a message consumer to receive messages sent to a destination.
xms::PropertyContext | +----xms::MessageConsumer
For a list of the XMS defined properties of a MessageConsumer object, see Properties of MessageConsumer.
Method | Description |
---|---|
close | Close the message consumer. |
getHandle | Get the handle that a C application would use to access the message consumer. |
getMessageListener | Get a pointer to the message listener that is registered with the message consumer. |
getMessageSelector | Get the message selector for the message consumer. |
isNull | Determine whether the MessageConsumer object is a null object. |
receive | Receive the next message for the message consumer. The call waits indefinitely for a message, or until the message consumer is closed. |
receive | Receive the next message for the message consumer. The call waits only a specified period of time for a message, or until the message consumer is closed. |
receiveNoWait | Receive the next message for the message consumer if one is available immediately. |
setMessageListener | Register a message listener with the message consumer. |
MessageListener * getMessageListener() const;
Get a pointer to the message listener that is registered with the message consumer.
For more information about using message listeners, see Using message listeners in C++.
String getMessageSelector() const;
Get the message selector for the message consumer.
Message * receive() const;
Receive the next message for the message consumer. The call waits indefinitely for a message, or until the message consumer is closed.
Message * receive(const xmsLONG waitInterval) const;
Receive the next message for the message consumer. The call waits only a specified period of time for a message, or until the message consumer is closed.
Message * receiveNoWait() const;
Receive the next message for the message consumer if one is available immediately.
xmsVOID setMessageListener(const MessageListener *lsr);
Register a message listener with the message consumer.
For more information about using message listeners, see Using message listeners in C++.