|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.service.impl.DurableQueueMessageContainer
A default implemenation of a Durable Queue based
MessageContainer
which acts as an adapter between the MessageContainerManager
requirements and those of the persistent MessageStore implementations.
| Constructor Summary | |
DurableQueueMessageContainer(PersistenceAdapter persistenceAdapter,
MessageStore messageStore,
String destinationName)
|
|
DurableQueueMessageContainer(PersistenceAdapter persistenceAdapter,
MessageStore messageStore,
String destinationName,
QueueList messagesToBeDelivered,
QueueList deliveredMessages)
|
|
| Method Summary | |
MessageIdentity |
addMessage(ActiveMQMessage message)
Add an ActiveMQMessage to the message container |
boolean |
containsMessage(MessageIdentity messageIdentity)
Returns whether or not this container contains the given message identity which provides an optimisation over getMessage() where the message does not need to be loaded. |
void |
delete(MessageIdentity messageID,
MessageAck ack)
Delete a message - if no |
String |
getDestinationName()
|
ActiveMQMessage |
getMessage(MessageIdentity messageID)
Return the ActiveMQMessage that matches the Id |
ActiveMQMessage |
peekNext(MessageIdentity messageID)
Used for browsing a MessageContainer this returns the next message in the container after the messageId |
ActiveMQMessage |
poll()
Some implementations may need to poll to fill subscriptions this returns the next message in the container |
void |
recoverMessageToBeDelivered(MessageIdentity messageIdentity)
Invoked during the recovery to add the given message to the end of the messages to be delivered. |
void |
registerMessageInterest(MessageIdentity messageIdentity)
Does nothing since when we receive an acknowledgement on a queue we can delete the message |
void |
reset()
called to reset dispatch pointers if a new Message Consumer joins |
void |
returnMessage(MessageIdentity messageIdentity)
After a poll() on the Container, if a message can't be dispatched, it is returned |
void |
start()
This container has just been loaded from disk and so it needs to be recovered, that is iterate through all the message IDs in the persistent store and add them to the in memory list of message IDs to be dispatched by consumers |
void |
stop()
Called to shutdown the service |
void |
unregisterMessageInterest(MessageIdentity messageIdentity,
MessageAck ack)
Does nothing since when we receive an acknowledgement on a queue we can delete the message |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DurableQueueMessageContainer(PersistenceAdapter persistenceAdapter,
MessageStore messageStore,
String destinationName)
public DurableQueueMessageContainer(PersistenceAdapter persistenceAdapter,
MessageStore messageStore,
String destinationName,
QueueList messagesToBeDelivered,
QueueList deliveredMessages)
| Method Detail |
public String getDestinationName()
getDestinationName in interface MessageContainer
public MessageIdentity addMessage(ActiveMQMessage message)
throws JMSException
MessageContainer
addMessage in interface MessageContainermessage -
JMSException
public void delete(MessageIdentity messageID,
MessageAck ack)
throws JMSException
MessageContainer
delete in interface MessageContainermessageID - ack -
JMSException
public ActiveMQMessage getMessage(MessageIdentity messageID)
throws JMSException
MessageContainer
getMessage in interface MessageContainermessageID -
JMSException
public boolean containsMessage(MessageIdentity messageIdentity)
throws JMSException
MessageContainer
containsMessage in interface MessageContainermessageIdentity -
JMSExceptionpublic void registerMessageInterest(MessageIdentity messageIdentity)
registerMessageInterest in interface MessageContainermessageIdentity -
public void unregisterMessageInterest(MessageIdentity messageIdentity,
MessageAck ack)
unregisterMessageInterest in interface MessageContainermessageIdentity - ack -
public ActiveMQMessage poll()
throws JMSException
QueueMessageContainer
poll in interface QueueMessageContainerJMSException
public ActiveMQMessage peekNext(MessageIdentity messageID)
throws JMSException
QueueMessageContainer
peekNext in interface QueueMessageContainermessageID - the id if the message. If this is null, the first message will be retrieved
JMSException
public void returnMessage(MessageIdentity messageIdentity)
throws JMSException
QueueMessageContainer
returnMessage in interface QueueMessageContainermessageIdentity -
JMSException
public void reset()
throws JMSException
reset in interface QueueMessageContainerJMSException
public void start()
throws JMSException
QueueMessageContainer
start in interface QueueMessageContainerJMSException
public void recoverMessageToBeDelivered(MessageIdentity messageIdentity)
throws JMSException
QueueMessageContainer
recoverMessageToBeDelivered in interface QueueMessageContainerJMSException
public void stop()
throws JMSException
Service
stop in interface ServiceJMSException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||