org.activemq.service.impl
Class MessageContainerManagerSupport

java.lang.Object
  extended by org.activemq.service.impl.MessageContainerManagerSupport
All Implemented Interfaces:
MessageContainerManager, Service
Direct Known Subclasses:
DurableQueueMessageContainerManager, DurableTopicMessageContainerManager

public abstract class MessageContainerManagerSupport
extends Object
implements MessageContainerManager

Version:
$Revision: 1.1.1.1 $

Field Summary
protected  Dispatcher dispatcher
           
protected  Map messageContainers
           
 
Constructor Summary
MessageContainerManagerSupport(Dispatcher dispatcher)
           
 
Method Summary
protected abstract  MessageContainer createContainer(String destinationName)
          Factory method to create a new MessageContainer
protected abstract  Destination createDestination(String destinationName)
          Factory method to create a new Destination
 void createMessageContainer(ActiveMQDestination dest)
          Creates a destination.
 void destroyMessageContainer(ActiveMQDestination dest)
          Destroys a destination.
 MessageContainer getContainer(String destinationName)
          Allows the lookup of a specific named message container
 DeadLetterPolicy getDeadLetterPolicy()
           
 Map getDestinations()
          Returns an unmodifiable map, indexed by String name, of all the Destination objects available in this container
 Map getMessageContainerAdmins()
          Returns an unmodifiable map, indexed by ActiveMQDestination, of all the MessageContainerAdmin objects available in this container
 boolean isMaintainDestinationStats()
           
protected  void loadContainer(String destinationName, Destination destination)
          Loads the container for the given name and destination on startup
 void setDeadLetterPolicy(DeadLetterPolicy policy)
          Set the DeadLetterPolicy for this Container Manager
 void setMaintainDestinationStats(boolean maintainDestinationStats)
           
 void start()
          Called to start the service
 void stop()
          Called to shutdown the service
protected  void updateAcknowledgeStats(BrokerClient client, Subscription subscription)
          Updates the message acknowledgement stats
protected  void updateSendStats(BrokerClient client, ActiveMQMessage message)
          Updates the message sending stats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.activemq.service.MessageContainerManager
acknowledgeMessage, addMessageConsumer, deleteSubscription, getLocalDestinations, poll, removeMessageConsumer, sendMessage
 

Field Detail

dispatcher

protected Dispatcher dispatcher

messageContainers

protected Map messageContainers
Constructor Detail

MessageContainerManagerSupport

public MessageContainerManagerSupport(Dispatcher dispatcher)
Method Detail

getDestinations

public Map getDestinations()
Description copied from interface: MessageContainerManager
Returns an unmodifiable map, indexed by String name, of all the Destination objects available in this container

Specified by:
getDestinations in interface MessageContainerManager
Returns:

start

public void start()
           throws JMSException
Description copied from interface: Service
Called to start the service

Specified by:
start in interface Service
Throws:
JMSException

stop

public void stop()
          throws JMSException
Description copied from interface: Service
Called to shutdown the service

Specified by:
stop in interface Service
Throws:
JMSException

getContainer

public MessageContainer getContainer(String destinationName)
                              throws JMSException
Description copied from interface: MessageContainerManager
Allows the lookup of a specific named message container

Specified by:
getContainer in interface MessageContainerManager
Returns:
the MessageContainer
Throws:
JMSException

createMessageContainer

public void createMessageContainer(ActiveMQDestination dest)
                            throws JMSException
Description copied from interface: MessageContainerManager
Creates a destination.

Specified by:
createMessageContainer in interface MessageContainerManager
Throws:
JMSException

getMessageContainerAdmins

public Map getMessageContainerAdmins()
Description copied from interface: MessageContainerManager
Returns an unmodifiable map, indexed by ActiveMQDestination, of all the MessageContainerAdmin objects available in this container

Specified by:
getMessageContainerAdmins in interface MessageContainerManager
Returns:
the Map

destroyMessageContainer

public void destroyMessageContainer(ActiveMQDestination dest)
                             throws JMSException
Description copied from interface: MessageContainerManager
Destroys a destination.

Specified by:
destroyMessageContainer in interface MessageContainerManager
Throws:
JMSException

isMaintainDestinationStats

public boolean isMaintainDestinationStats()

setMaintainDestinationStats

public void setMaintainDestinationStats(boolean maintainDestinationStats)

getDeadLetterPolicy

public DeadLetterPolicy getDeadLetterPolicy()
Specified by:
getDeadLetterPolicy in interface MessageContainerManager
Returns:
the DeadLetterPolicy for this Container Manager

setDeadLetterPolicy

public void setDeadLetterPolicy(DeadLetterPolicy policy)
Set the DeadLetterPolicy for this Container Manager

Specified by:
setDeadLetterPolicy in interface MessageContainerManager
Parameters:
policy -

createDestination

protected abstract Destination createDestination(String destinationName)
Factory method to create a new Destination


createContainer

protected abstract MessageContainer createContainer(String destinationName)
                                             throws JMSException
Factory method to create a new MessageContainer

Throws:
JMSException

loadContainer

protected void loadContainer(String destinationName,
                             Destination destination)
                      throws JMSException
Loads the container for the given name and destination on startup

Throws:
JMSException

updateAcknowledgeStats

protected void updateAcknowledgeStats(BrokerClient client,
                                      Subscription subscription)
Updates the message acknowledgement stats

Parameters:
client -
subscription -

updateSendStats

protected void updateSendStats(BrokerClient client,
                               ActiveMQMessage message)
                        throws JMSException
Updates the message sending stats

Parameters:
client -
message -
Throws:
JMSException


Copyright © 2004-2010 Protique, Ltd.. All Rights Reserved.