|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.service.boundedvm.TransientTopicBoundedMessageContainer
A MessageContainer for transient topics One of these exists for every active Connection consuming transient Topic messages
Constructor Summary | |
TransientTopicBoundedMessageContainer(MessageContainerManager manager,
BrokerClient client,
BoundedPacketQueue queue)
Construct this beast |
Method Summary | |
void |
addConsumer(Filter filter,
ConsumerInfo info)
Add a consumer to dispatch messages to |
MessageIdentity |
addMessage(ActiveMQMessage msg)
Add an ActiveMQMessage to the message container |
void |
close()
close down this 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 messageIdentity,
MessageAck ack)
Delete a message - if no |
void |
empty()
Deletes all the messages that a container holds. |
BrokerClient |
getBrokerClient()
|
String |
getDestinationName()
|
ActiveMQMessage |
getMessage(MessageIdentity messageIdentity)
Return the ActiveMQMessage that matches the Id |
MessageContainerAdmin |
getMessageContainerAdmin()
|
boolean |
hasConsumerFor(ActiveMQDestination destination)
|
boolean |
isDeadLetterQueue()
returns true if this container is a dead letter queue |
boolean |
isInactive()
|
void |
registerMessageInterest(MessageIdentity messageIdentity)
Register that a consumer will be interested in this message |
void |
removeConsumer(ConsumerInfo info)
Remove a consumer |
void |
run()
do some dispatching |
void |
start()
start working |
void |
stop()
stop working |
boolean |
targetAndDispatch(BrokerClient sender,
ActiveMQMessage message)
See if this container should get this message and dispatch it |
void |
unregisterMessageInterest(MessageIdentity messageIdentity,
MessageAck ack)
A message consumer calls this when it's no longer interested in a message so that we know when we can delete (or archive) it |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransientTopicBoundedMessageContainer(MessageContainerManager manager, BrokerClient client, BoundedPacketQueue queue)
manager
- client
- queue
- Method Detail |
public boolean isInactive()
public BrokerClient getBrokerClient()
public void addConsumer(Filter filter, ConsumerInfo info)
filter
- info
- public void removeConsumer(ConsumerInfo info)
info
- public void start()
start
in interface Service
public boolean targetAndDispatch(BrokerClient sender, ActiveMQMessage message) throws JMSException
sender
- the BrokerClient the message came frommessage
-
JMSException
public void stop()
stop
in interface Service
public void close()
public void run()
run
in interface Runnable
public boolean hasConsumerFor(ActiveMQDestination destination)
destination
-
public String getDestinationName()
getDestinationName
in interface MessageContainer
public MessageIdentity addMessage(ActiveMQMessage msg) throws JMSException
MessageContainer
addMessage
in interface MessageContainer
msg
-
JMSException
public void delete(MessageIdentity messageIdentity, MessageAck ack) throws JMSException
MessageContainer
delete
in interface MessageContainer
messageIdentity
- ack
-
JMSException
public ActiveMQMessage getMessage(MessageIdentity messageIdentity) throws JMSException
MessageContainer
getMessage
in interface MessageContainer
messageIdentity
-
JMSException
public void registerMessageInterest(MessageIdentity messageIdentity) throws JMSException
MessageContainer
registerMessageInterest
in interface MessageContainer
messageIdentity
-
JMSException
public void unregisterMessageInterest(MessageIdentity messageIdentity, MessageAck ack) throws JMSException
MessageContainer
unregisterMessageInterest
in interface MessageContainer
messageIdentity
- ack
-
JMSException
public boolean containsMessage(MessageIdentity messageIdentity) throws JMSException
MessageContainer
containsMessage
in interface MessageContainer
messageIdentity
-
JMSException
public MessageContainerAdmin getMessageContainerAdmin()
getMessageContainerAdmin
in interface MessageContainer
MessageContainer.getMessageContainerAdmin()
public void empty() throws JMSException
MessageContainerAdmin
empty
in interface MessageContainerAdmin
JMSException
MessageContainerAdmin.empty()
public boolean isDeadLetterQueue()
MessageContainer
isDeadLetterQueue
in interface MessageContainer
MessageContainer.isDeadLetterQueue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |