|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.messagemgr.ConsumerEndpoint | +--org.exolab.jms.messagemgr.QueueBrowserEndpoint
A QueueBrowserEndpoint is a QueueListener to a QueueDestinationCache. This enables it to receive all the messages, which it then feeds down to the client side.
Fields inherited from class org.exolab.jms.messagemgr.ConsumerEndpoint |
_ackMode, _connectionId, _listener, _nolocal, _scheduler, _selector, _session, _size, _transacted, _waitingForMessage, _waitingForMessageMonitor |
Method Summary | |
boolean |
deliverMessages()
Deliver messages in the cache to the consumer. |
protected void |
doClose()
Closes this endpoint |
JmsDestination |
getDestination()
Return the destination that this consumer is subscribed to |
void |
onMessage(MessageImpl message)
This method is called when a new message is added to a queue cache |
MessageHandle |
receiveMessage(long wait)
Return the next message to the client. |
java.util.Vector |
receiveMessages(int count)
Return, at most, count messages from the cache. |
void |
returnMessage(MessageHandle handle)
Return the specified message to the cache. |
void |
setMessageListener(InternalMessageListener listener)
Set the message listener for this consmer. |
void |
unregister()
Unregister this consumer for the specified destination cache, so that it will stop receiving messages from it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public boolean deliverMessages()
This is not relevant to QueueBrowsers, and thus shouldn't be invoked.
deliverMessages
in class ConsumerEndpoint
false
public MessageHandle receiveMessage(long wait)
ConsumerEndpoint
receiveMessage
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
wait
- - the number of milliseconds to waitpublic java.util.Vector receiveMessages(int count)
count
- - the max number of messages to receivepublic JmsDestination getDestination()
ConsumerEndpoint
getDestination
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
public void unregister()
ConsumerEndpoint
unregister
in class ConsumerEndpoint
public void returnMessage(MessageHandle handle)
ConsumerEndpoint
returnMessage
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
handle
- - handle to returnpublic void onMessage(MessageImpl message)
QueueListener
onMessage
in interface QueueListener
org.exolab.jms.messagemgr.QueueListener
message
- - message added to cachepublic void setMessageListener(InternalMessageListener listener)
ConsumerEndpoint
Each consumer cache can only have a single message listener. To remove the message listener call this method with null argument
setMessageListener
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
listener
- - the message listener to add.protected void doClose()
doClose
in class ConsumerEndpoint
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |