|
|||||||||
| 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.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 jrun.jms.core.messagemgr.ConsumerEndpoint |
_ackMode, _connectionId, _destroyed, _listener, _messages, _nolocal, _scheduled, _scheduler, _selector, _session, _size, _stopped, _transacted |
| Method Summary | |
boolean |
canGarbageCollect(MessageHandle handle)
Check if this message is referenced by this endpoint. |
void |
destroy()
Destroy this object |
JmsDestination |
getDestination()
Return the destination that this consumer is subscribed too |
void |
onMessage(MessageImpl message)
This method is called when a new message is added to a queue cache |
MessageHandle |
receiveMessage()
Return the next message to the client. |
java.util.Vector |
receiveMessages(int count)
Return, at most, count messages from the cache. |
void |
run()
The run method is used to asynchronously deliver the messages in the cache to the consumer. |
void |
setLastMessageProcessed(long id)
|
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, messageAdded, messageRemoved, persistentMessageAdded, persistentMessageRemoved, recover, schedule, 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 MessageHandle receiveMessage()
ConsumerEndpointreceiveMessage in class ConsumerEndpointjrun.jms.core.messagemgr.ConsumerEndpointpublic java.util.Vector receiveMessages(int count)
count - - the max number of messages to receivepublic JmsDestination getDestination()
ConsumerEndpointgetDestination in class ConsumerEndpointjrun.jms.core.messagemgr.ConsumerEndpointpublic void unregister()
ConsumerEndpointunregister in class ConsumerEndpointpublic void onMessage(MessageImpl message)
QueueListeneronMessage in interface QueueListenerjrun.jms.core.messagemgr.QueueListenermessage - - message added to cachepublic void setLastMessageProcessed(long id)
public boolean canGarbageCollect(MessageHandle handle)
ConsumerEndpointcanGarbageCollect in class ConsumerEndpointjrun.jms.core.messagemgr.ConsumerEndpointhandle - - message to checkpublic 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 void destroy()
destroy in class ConsumerEndpointpublic void stopMessageDelivery()
ConsumerEndpointstopMessageDelivery in class ConsumerEndpoint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||