|
||||||||
| 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.QueueConsumerEndpoint
A QueueConsumerEndpoint extends ConsumerEndpoint. This object
shares access to a particular queue with other QueueConsumerEndpoint
instances.
| 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 |
int |
getMessageCount()
Return the number of unsent messages |
boolean |
hasMessageListener()
Check whether a listener has been registered with this endpoint to support async message delivery |
boolean |
messageAdded(MessageImpl message)
This event is called when a non-persistent message is added to the DestinationCache. |
boolean |
messageRemoved(MessageImpl message)
This event is called when a message is removed from the DestinationCache. |
boolean |
persistentMessageAdded(java.sql.Connection connection,
MessageImpl message)
This event is called when a persistent message is added to the DestinationCache. |
MessageHandle |
receiveMessage(long wait)
Return the next message to the client. |
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 int getMessageCount()
getMessageCount in class ConsumerEndpointpublic boolean deliverMessages()
deliverMessages in class ConsumerEndpointtrue if the endpoint should be rescheduledpublic void setMessageListener(InternalMessageListener listener)
ConsumerEndpointEach consumer cache can only have a single message listener. To remove the message listener call this method with null argument
setMessageListener in class ConsumerEndpointorg.exolab.jms.messagemgr.ConsumerEndpointlistener - - the message listener to add.public MessageHandle receiveMessage(long wait)
ConsumerEndpointreceiveMessage in class ConsumerEndpointorg.exolab.jms.messagemgr.ConsumerEndpointwait - - the number of milliseconds to waitpublic boolean hasMessageListener()
public void unregister()
ConsumerEndpointunregister in class ConsumerEndpointpublic JmsDestination getDestination()
ConsumerEndpointgetDestination in class ConsumerEndpointorg.exolab.jms.messagemgr.ConsumerEndpointpublic boolean messageAdded(MessageImpl message)
DestinationCacheEventListenermessageAdded in class ConsumerEndpointorg.exolab.jms.messagemgr.DestinationCacheEventListenermessage - - message added to cache
public boolean persistentMessageAdded(java.sql.Connection connection,
MessageImpl message)
throws PersistenceException
DestinationCacheEventListenerpersistentMessageAdded in class ConsumerEndpointorg.exolab.jms.messagemgr.DestinationCacheEventListenerconnection - - the database connectionmessage - - message added to cachePersistenceException - - if there is a persistence related problempublic boolean messageRemoved(MessageImpl message)
DestinationCacheEventListenermessageRemoved in class ConsumerEndpointorg.exolab.jms.messagemgr.DestinationCacheEventListenermessage - - message removed from cacheprotected void doClose()
doClose in class ConsumerEndpoint
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||