|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.service.boundedvm.TransientQueueBoundedMessageContainer
public class TransientQueueBoundedMessageContainer
A MessageContainer for transient queues
Constructor Summary | |
---|---|
TransientQueueBoundedMessageContainer(Executor threadPool,
MemoryBoundedQueueManager queueManager,
ActiveMQDestination destination,
RedeliveryPolicy redeliveryPolicy,
DeadLetterPolicy deadLetterPolicy)
Construct this beast |
Method Summary | |
---|---|
TransientQueueSubscription |
addConsumer(Filter filter,
ConsumerInfo info,
BrokerClient client)
Add a consumer to dispatch messages to |
void |
addMessage(ActiveMQMessage msg)
Add an ActiveMQMessage to the message container |
protected void |
clear()
|
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. |
void |
enqueue(ActiveMQMessage message)
enqueue a message for dispatching |
ActiveMQDestination |
getDestination()
|
String |
getDestinationName()
|
long |
getIdleTimestamp()
|
ActiveMQMessage |
getMessage(MessageIdentity messageIdentity)
Return the ActiveMQMessage that matches the Id |
MessageContainerAdmin |
getMessageContainerAdmin()
|
boolean |
isActive()
|
boolean |
isDeadLetterQueue()
returns true if this container is a dead letter queue |
boolean |
isEmpty()
|
void |
redeliver(ActiveMQMessage message)
re-enqueue a message for dispatching |
void |
redeliver(List messages)
|
void |
registerMessageInterest(MessageIdentity messageIdentity)
Register that a consumer will be interested in this message |
void |
removeConsumer(ConsumerInfo info)
Remove a consumer |
protected void |
removeExpiredMessages()
|
void |
run()
do some dispatching |
void |
start()
start working |
protected void |
startRunning()
|
void |
stop()
stop working |
void |
unregisterMessageInterest(MessageIdentity messageIdentity)
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 TransientQueueBoundedMessageContainer(Executor threadPool, MemoryBoundedQueueManager queueManager, ActiveMQDestination destination, RedeliveryPolicy redeliveryPolicy, DeadLetterPolicy deadLetterPolicy)
threadPool
- queueManager
- destination
- redeliveryPolicy
- deadLetterPolicy
- Method Detail |
---|
public boolean isActive()
public boolean isEmpty()
public long getIdleTimestamp()
public TransientQueueSubscription addConsumer(Filter filter, ConsumerInfo info, BrokerClient client) throws JMSException
filter
- info
- client
-
JMSException
public void removeConsumer(ConsumerInfo info) throws JMSException
info
-
JMSException
public void start() throws JMSException
start
in interface Service
JMSException
public void enqueue(ActiveMQMessage message)
message
- public void redeliver(ActiveMQMessage message)
message
- public void redeliver(List messages)
public void stop()
stop
in interface Service
public void close() throws JMSException
JMSException
public void run()
run
in interface Runnable
public ActiveMQDestination getDestination()
public String getDestinationName()
getDestinationName
in interface MessageContainer
getDestinationName
in interface MessageContainerAdmin
public void 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) throws JMSException
MessageContainer
unregisterMessageInterest
in interface MessageContainer
messageIdentity
- ack
-
JMSException
public boolean containsMessage(MessageIdentity messageIdentity) throws JMSException
MessageContainer
containsMessage
in interface MessageContainer
messageIdentity
-
JMSException
protected void clear()
protected void removeExpiredMessages()
protected void startRunning()
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 |