|
||||||||
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 ConsumerEndpoint
public boolean deliverMessages()
deliverMessages
in class ConsumerEndpoint
true
if the endpoint should be rescheduledpublic 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.public MessageHandle receiveMessage(long wait)
ConsumerEndpoint
receiveMessage
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
wait
- - the number of milliseconds to waitpublic boolean hasMessageListener()
public void unregister()
ConsumerEndpoint
unregister
in class ConsumerEndpoint
public JmsDestination getDestination()
ConsumerEndpoint
getDestination
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
public boolean messageAdded(MessageImpl message)
DestinationCacheEventListener
messageAdded
in class ConsumerEndpoint
org.exolab.jms.messagemgr.DestinationCacheEventListener
message
- - message added to cachepublic boolean persistentMessageAdded(java.sql.Connection connection, MessageImpl message) throws PersistenceException
DestinationCacheEventListener
persistentMessageAdded
in class ConsumerEndpoint
org.exolab.jms.messagemgr.DestinationCacheEventListener
connection
- - the database connectionmessage
- - message added to cachePersistenceException
- - if there is a persistence related problempublic boolean messageRemoved(MessageImpl message)
DestinationCacheEventListener
messageRemoved
in class ConsumerEndpoint
org.exolab.jms.messagemgr.DestinationCacheEventListener
message
- - 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 |