|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jrun.jms.core.messagemgr.ConsumerEndpoint
|
+--jrun.jms.core.messagemgr.QueueConsumerEndpoint
A QueueConsumerEndpoint extends ConsumerEndpoint. This object
shares access to a particular Queue with other QueueConsumerEndpoint
instances.
| Fields inherited from class jrun.jms.core.messagemgr.ConsumerEndpoint |
_ackMode, _connectionId, _destroyed, _listener, _messages, _nolocal, _scheduled, _scheduler, _selector, _session, _size, _stopped, _transacted |
| Method Summary | |
boolean |
canGarbageCollect(MessageHandle handle)
Always return true since this endpoint does not hold any objects. |
void |
destroy()
Destroy this object |
JmsDestination |
getDestination()
Return the destination that this consumer is subscribed too |
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. |
MessageHandle |
receiveMessage()
Return the next message to the client. |
void |
recover()
This message will return all unacked messages to the queue and allow them to be resent to the consumer with the redelivery flag on. |
void |
run()
The run method is used to asynchronously deliver the messages in the cache to the consumer. |
protected void |
schedule()
Schedule asynchronouse message delivery |
void |
setMessageListener(InternalMessageListener listener)
Set the message listener for this consmer. |
void |
stopMessageDelivery()
Stop delivering messages to the registered listener |
void |
unregister()
Unregister this consumer for the specified destination cache, so that it will stop receiving messages from it. |
| Methods inherited from class jrun.jms.core.messagemgr.ConsumerEndpoint |
clearMessages, getAckMode, getClientId, getConnectionId, getId, getIdAsString, getLogger, getMaximumSize, getMessageCount, getNoLocal, getSelector, getSession, getTransacted, getUnprocessedMessageCount, getUnsentMessages, hashCode, persistentMessageAdded, persistentMessageRemoved, setAckMode, setCacheEvictionPolicy, setClientId, setConnectionId, setMaximumSize, setNoLocal, setSelector, setStopped, setTransacted, shutdown, startMessageDelivery, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public void run()
Scheduler.
The thread, assigned by the scheduler, will attempt to deliver all the messages in the cache and then terminate. In addition this method must be prepared to be interrupted.
public 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 ConsumerEndpointjrun.jms.core.messagemgr.ConsumerEndpointlistener - - the message listener to add.public MessageHandle receiveMessage()
ConsumerEndpointreceiveMessage in class ConsumerEndpointjrun.jms.core.messagemgr.ConsumerEndpointpublic boolean canGarbageCollect(MessageHandle handle)
canGarbageCollect in class ConsumerEndpointhandle - - message to checkpublic boolean hasMessageListener()
public void unregister()
ConsumerEndpointunregister in class ConsumerEndpointpublic JmsDestination getDestination()
ConsumerEndpointgetDestination in class ConsumerEndpointjrun.jms.core.messagemgr.ConsumerEndpointpublic boolean messageAdded(MessageImpl message)
DestinationCacheEventListenermessageAdded in class ConsumerEndpointjrun.jms.core.messagemgr.DestinationCacheEventListenermessage - - message added to cachepublic boolean messageRemoved(MessageImpl message)
DestinationCacheEventListenermessageRemoved in class ConsumerEndpointjrun.jms.core.messagemgr.DestinationCacheEventListenermessage - - message removed from cachepublic void destroy()
destroy in class ConsumerEndpointpublic void stopMessageDelivery()
ConsumerEndpointstopMessageDelivery in class ConsumerEndpointprotected void schedule()
ConsumerEndpointschedule in class ConsumerEndpointpublic void recover()
ConsumerEndpointrecover in class ConsumerEndpoint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||