|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A DestinationCache is used to cache messages for a particular destination.
It implementsMessageManagerEventListener
in order to be notified of
messages being added to the MessageManager
.
A ConsumerEndpoint
registers with a DestinationCache
to
receive messages for a particular destination.
Method Summary | |
boolean |
addConsumer(ConsumerEndpoint consumer)
Register a consumer with this cache. |
boolean |
canDestroy()
Determines if this cache can be destroyed. |
void |
destroy()
Destroy this cache. |
JmsDestination |
getDestination()
Returns the destination that messages are being cached for |
int |
getMessageCount()
Returns the number of messages in the cache. |
boolean |
hasConsumers()
Determines if the cache has any consumers. |
void |
removeConsumer(ConsumerEndpoint consumer)
Remove the consumer for the list of registered consumers. |
void |
returnMessageHandle(MessageHandle handle)
Return a message handle back to the cache, to recover unsent or unacknowledged messages. |
Methods inherited from interface org.exolab.jms.messagemgr.MessageManagerEventListener |
messageAdded, persistentMessageAdded |
Methods inherited from interface org.exolab.jms.gc.GarbageCollectable |
collectGarbage |
Method Detail |
public JmsDestination getDestination()
public boolean addConsumer(ConsumerEndpoint consumer)
consumer
- the message consumer for this destinationtrue
if registered; otherwise false
public void removeConsumer(ConsumerEndpoint consumer)
consumer
- the consumer to removepublic boolean hasConsumers()
true
if the cache has consumers;
otherwise false
public void returnMessageHandle(MessageHandle handle)
handle
- the message handle to returnpublic int getMessageCount()
public boolean canDestroy()
true
if the cache can be destroyed, otherwise
false
public void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |