|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.jms.messagemgr.ConsumerEndpoint
org.exolab.jms.messagemgr.QueueConsumerEndpoint
public class QueueConsumerEndpoint
A QueueConsumerEndpoint extends ConsumerEndpoint. This object
shares access to a particular queue with other QueueConsumerEndpoint
instances.
| Field Summary |
|---|
| 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 ConsumerEndpointlistener - - the message listener to add.public MessageHandle receiveMessage(long wait)
ConsumerEndpoint
receiveMessage in class ConsumerEndpointwait - - the number of milliseconds to wait
public boolean hasMessageListener()
public void unregister()
ConsumerEndpoint
unregister in class ConsumerEndpointpublic JmsDestination getDestination()
ConsumerEndpoint
getDestination in class ConsumerEndpointpublic boolean messageAdded(MessageImpl message)
DestinationCacheEventListener
messageAdded in interface DestinationCacheEventListenermessageAdded in class ConsumerEndpointmessage - - message added to cache
public boolean persistentMessageAdded(java.sql.Connection connection,
MessageImpl message)
throws PersistenceException
DestinationCacheEventListener
persistentMessageAdded in interface DestinationCacheEventListenerpersistentMessageAdded in class ConsumerEndpointconnection - - the database connectionmessage - - message added to cache
PersistenceException - - if there is a persistence related problempublic boolean messageRemoved(MessageImpl message)
DestinationCacheEventListener
messageRemoved in interface DestinationCacheEventListenermessageRemoved in class ConsumerEndpointmessage - - message removed from cacheprotected void doClose()
doClose in class ConsumerEndpoint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||