|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.messagemgr.AbstractConsumerEndpoint | +--org.exolab.jms.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.
Constructor Summary | |
QueueBrowserEndpoint(long consumerId,
QueueDestinationCache cache,
java.lang.String selector)
Create a new QueueBrowserEndpoint . |
Method Summary | |
protected void |
doClose()
Closes this endpoint. |
protected MessageHandle |
doReceive(Condition cancel)
Return the next available message to the client. |
int |
getMessageCount()
Return the number of unsent messages in the cache for this consumer. |
boolean |
messageAdded(MessageHandle handle,
MessageImpl message)
This event is called when a non-persistent message is added to a DestinationCache .. |
void |
messageRemoved(java.lang.String messageId)
This event is called when a message is removed from the DestinationCache . |
boolean |
persistentMessageAdded(MessageHandle handle,
MessageImpl message)
This event is called when a persistent message is added to the DestinationCache . |
void |
persistentMessageRemoved(java.lang.String messageId)
This event is called when a message is removed from the DestinationCache . |
Methods inherited from class org.exolab.jms.messagemgr.AbstractConsumerEndpoint |
canConsume, close, getDestination, getId, getNoLocal, getPersistentId, getSelector, isAsynchronous, isClosed, isPersistent, isWaitingForMessage, notifyMessageAvailable, receive, selects, setAsynchronous, setListener, setNoLocal, setSelector, setWaitingForMessage, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public QueueBrowserEndpoint(long consumerId, QueueDestinationCache cache, java.lang.String selector) throws javax.jms.InvalidSelectorException, javax.jms.JMSException
QueueBrowserEndpoint
.consumerId
- the identity of this consumercache
- the destination cacheselector
- the message selector. May be null
javax.jms.InvalidSelectorException
- if selector
is invalidjavax.jms.JMSException
- if the destination cache can't be
createdMethod Detail |
public boolean messageAdded(MessageHandle handle, MessageImpl message)
DestinationCache
..handle
- a handle to the added messagemessage
- the added messagetrue
if the listener accepted the message; otherwise
false
public boolean persistentMessageAdded(MessageHandle handle, MessageImpl message)
DestinationCache
.handle
- a handle to the added messagemessage
- the added messagetrue
public void messageRemoved(java.lang.String messageId)
DestinationCache
.messageId
- the identifier of the removed messagepublic void persistentMessageRemoved(java.lang.String messageId)
DestinationCache
.messageId
- a handle to the removed messagepublic int getMessageCount()
protected MessageHandle doReceive(Condition cancel) throws javax.jms.JMSException
doReceive
in class AbstractConsumerEndpoint
cancel
- null
if none is availablejavax.jms.JMSException
- for any errorprotected void doClose()
doClose
in class AbstractConsumerEndpoint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |