|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.service.impl.MessageContainerManagerSupport
org.codehaus.activemq.service.impl.DurableTopicMessageContainerManager
A default Broker used for Topic messages for durable consumers
Field Summary | |
protected java.util.Map |
activeSubscriptions
|
protected FilterFactory |
filterFactory
|
protected SubscriptionContainer |
subscriptionContainer
|
Fields inherited from class org.codehaus.activemq.service.impl.MessageContainerManagerSupport |
dispatcher, messageContainers |
Constructor Summary | |
DurableTopicMessageContainerManager(PersistenceAdapter persistenceAdapter)
|
|
DurableTopicMessageContainerManager(PersistenceAdapter persistenceAdapter,
SubscriptionContainer subscriptionContainer,
FilterFactory filterFactory,
Dispatcher dispatcher)
|
Method Summary | |
void |
acknowledgeMessage(BrokerClient client,
MessageAck ack)
Acknowledge a message as being read and consumed byh the Consumer |
void |
acknowledgeTransactedMessage(BrokerClient client,
java.lang.String transactionId,
MessageAck ack)
This is a hook to notify the dispatcher for the clients subscription that we have acknowledged a message within a transaction but before the commit - so the message is not really being acknowledged here but this method is intended to be a hook to let the dispatcher know that we can now send another message to the client. |
void |
addMessageConsumer(BrokerClient client,
ConsumerInfo info)
|
void |
commitTransaction(BrokerClient client,
java.lang.String transactionId)
A hook when the transaction is about to be commited; so apply all outstanding commands to the Journal if using a Journal (transaction log) |
protected Filter |
createFilter(ConsumerInfo info)
Create filter for a Consumer |
void |
deleteSubscription(java.lang.String clientId,
java.lang.String subscriberName)
Delete a durable subscriber |
protected void |
doAddMessageConsumer(BrokerClient client,
ConsumerInfo info)
|
MessageContainer |
getContainer(java.lang.String destinationName)
Allows the lookup of a specific named message container |
protected void |
loadAllMessageContainers()
Called when recovering a wildcard subscription where we need to load all the durable message containers (for which we have any outstanding messages to deliver) into RAM |
void |
poll()
poll or messages |
protected void |
recoverSubscriptions(Subscription subscription)
This method is called when a new durable subscription is started and so we need to go through each matching message container and dispatch any matching messages that may be outstanding |
void |
redeliverMessage(BrokerClient client,
MessageAck ack)
Called after a rollback of a JMS transaction to redeliver the message to the consumers dispatch queue |
void |
removeMessageConsumer(BrokerClient client,
ConsumerInfo info)
|
void |
rollbackTransaction(BrokerClient client,
java.lang.String transactionId)
A hook when the transaction is about to be rolled back; so discard all outstanding commands that are pending to be written to the Journal |
void |
sendMessage(BrokerClient client,
ActiveMQMessage message)
|
Methods inherited from class org.codehaus.activemq.service.impl.MessageContainerManagerSupport |
start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SubscriptionContainer subscriptionContainer
protected FilterFactory filterFactory
protected java.util.Map activeSubscriptions
Constructor Detail |
public DurableTopicMessageContainerManager(PersistenceAdapter persistenceAdapter)
public DurableTopicMessageContainerManager(PersistenceAdapter persistenceAdapter, SubscriptionContainer subscriptionContainer, FilterFactory filterFactory, Dispatcher dispatcher)
Method Detail |
public void addMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
client
- info
-
JMSException
public void removeMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
client
- info
-
JMSException
public void deleteSubscription(java.lang.String clientId, java.lang.String subscriberName) throws JMSException
clientId
- subscriberName
-
JMSException
- if the subscriber doesn't exist or is still activepublic void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException
client
- message
-
JMSException
public void acknowledgeMessage(BrokerClient client, MessageAck ack) throws JMSException
client
- ack
-
JMSException
public void acknowledgeTransactedMessage(BrokerClient client, java.lang.String transactionId, MessageAck ack) throws JMSException
MessageContainerManager
JMSException
public void redeliverMessage(BrokerClient client, MessageAck ack) throws JMSException
MessageContainerManager
client
- ack
-
JMSException
public void poll() throws JMSException
JMSException
public void commitTransaction(BrokerClient client, java.lang.String transactionId)
MessageContainerManager
client
- transactionId
- public void rollbackTransaction(BrokerClient client, java.lang.String transactionId)
MessageContainerManager
client
- transactionId
- public MessageContainer getContainer(java.lang.String destinationName) throws JMSException
MessageContainerManager
destinationName
-
JMSException
protected void doAddMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
JMSException
protected void recoverSubscriptions(Subscription subscription) throws JMSException
subscription
-
JMSException
protected void loadAllMessageContainers()
protected Filter createFilter(ConsumerInfo info) throws JMSException
info
-
JMSException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |