org.jboss.mq.server.jmx
Class DestinationManager

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.mq.server.jmx.InterceptorMBeanSupport (src) 
              extended byorg.jboss.mq.server.jmx.DestinationManager
All Implemented Interfaces:
InterceptorMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class DestinationManager
extends InterceptorMBeanSupport (src)

JMX MBean implementation for JBossMQ.


Field Summary
 java.lang.String jndiBindLocation
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
DestinationManager()
           
 
Method Summary
protected  void createDestination(java.lang.String type, ObjectName (src)  name, java.lang.String jndiLocation)
           
 void createQueue(java.lang.String name)
           
 void createQueue(java.lang.String name, java.lang.String jndiLocation)
           
protected  void createService()
          Sub-classes should override this method to provide custum 'create' logic.
 void createTopic(java.lang.String name)
           
 void createTopic(java.lang.String name, java.lang.String jndiLocation)
           
protected  void destroyDestination(ObjectName (src)  name)
           
 void destroyQueue(java.lang.String name)
           
protected  void destroyService()
          Sub-classes should override this method to provide custum 'destroy' logic.
 void destroyTopic(java.lang.String name)
           
 int getClientCount()
           
 java.util.Map getClients()
           
 JMSServerInterceptor (src) getInterceptor()
           
 ObjectName (src) getMessageCache()
          Get the value of MessageCache.
 MessageCounter (src) [] getMessageCounter()
          get message counter of all configured destinations
 int getMessageCounterHistoryDayLimit()
          Gets the destination message counter history day limit
 MessageStatistics (src) [] getMessageStatistics()
          get message stats
protected  ObjectName (src) getObjectName(MBeanServer (src)  server, ObjectName (src)  name)
          Sub-classes should override this method if they only need to set their object name during MBean pre-registration.
 ObjectName (src) getPersistenceManager()
          Get the value of PersistenceManager.
protected  ObjectName (src) getQueueObjectName(java.lang.String name)
           
 java.lang.Class getReceiversImpl()
          Get the receivers implemenetation
protected  ServiceControllerMBean getServiceController()
           
 ObjectName (src) getStateManager()
          Get the value of StateManager.
 boolean getTemporaryInMemory()
          Retrieve the temporary topic/queue in memory mode
 int getTemporaryMaxDepth()
          Retrieve the temporary topic/queue max depth
protected  ObjectName (src) getTopicObjectName(java.lang.String name)
           
 java.lang.String listMessageCounter()
          List message counter of all configured destinations as HTML table
 void resetMessageCounter()
          Reset message counter of all configured destinations
 void setMessageCache(ObjectName (src)  objectName)
          Set the value of MessageCache.
 void setMessageCounterHistoryDayLimit(int days)
          Sets the destination message counter history day limit <0: unlimited, =0: disabled, > 0 maximum day count
 void setPersistenceManager(ObjectName (src)  objectName)
          Set the value of PersistenceManager.
 void setReceiversImpl(java.lang.Class clazz)
          Set the receivers implementation class
 void setStateManager(ObjectName (src)  objectName)
          Set the value of StateManager.
 void setTemporaryInMemory(boolean mode)
          Set the temporary topic/queue in memory mode
 void setTemporaryMaxDepth(int depth)
          Set the temporary topic/queue max depth
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 
Methods inherited from class org.jboss.mq.server.jmx.InterceptorMBeanSupport (src)
getNextInterceptor, setNextInterceptor
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Field Detail

jndiBindLocation

public java.lang.String jndiBindLocation
Constructor Detail

DestinationManager

public DestinationManager()
Method Detail

getClientCount

public int getClientCount()
Returns:
the count of active clients

getClients

public java.util.Map getClients()
Returns:
a Map of current clients

getPersistenceManager

public ObjectName (src)  getPersistenceManager()
Get the value of PersistenceManager.

Returns:
value of PersistenceManager.

setPersistenceManager

public void setPersistenceManager(ObjectName (src)  objectName)
Set the value of PersistenceManager.


getStateManager

public ObjectName (src)  getStateManager()
Get the value of StateManager.

Returns:
value of StateManager.

setStateManager

public void setStateManager(ObjectName (src)  objectName)
Set the value of StateManager.


getMessageCache

public ObjectName (src)  getMessageCache()
Get the value of MessageCache.

Returns:
value of MessageCache.

setMessageCache

public void setMessageCache(ObjectName (src)  objectName)
Set the value of MessageCache.


getTemporaryMaxDepth

public int getTemporaryMaxDepth()
Retrieve the temporary topic/queue max depth

Returns:
the maximum depth

setTemporaryMaxDepth

public void setTemporaryMaxDepth(int depth)
Set the temporary topic/queue max depth

Parameters:
depth - the maximum depth

getTemporaryInMemory

public boolean getTemporaryInMemory()
Retrieve the temporary topic/queue in memory mode

Returns:
true for in memory

setTemporaryInMemory

public void setTemporaryInMemory(boolean mode)
Set the temporary topic/queue in memory mode

Parameters:
mode - true for in memory

getReceiversImpl

public java.lang.Class getReceiversImpl()
Get the receivers implemenetation

Returns:
the receivers implementation class

setReceiversImpl

public void setReceiversImpl(java.lang.Class clazz)
Set the receivers implementation class

Parameters:
clazz - the receivers implementation class

createQueue

public void createQueue(java.lang.String name)
                 throws java.lang.Exception
Throws:
java.lang.Exception

createTopic

public void createTopic(java.lang.String name)
                 throws java.lang.Exception
Throws:
java.lang.Exception

createQueue

public void createQueue(java.lang.String name,
                        java.lang.String jndiLocation)
                 throws java.lang.Exception
Throws:
java.lang.Exception

createTopic

public void createTopic(java.lang.String name,
                        java.lang.String jndiLocation)
                 throws java.lang.Exception
Throws:
java.lang.Exception

createDestination

protected void createDestination(java.lang.String type,
                                 ObjectName (src)  name,
                                 java.lang.String jndiLocation)
                          throws java.lang.Exception
Throws:
java.lang.Exception

destroyQueue

public void destroyQueue(java.lang.String name)
                  throws java.lang.Exception
Throws:
java.lang.Exception

destroyTopic

public void destroyTopic(java.lang.String name)
                  throws java.lang.Exception
Throws:
java.lang.Exception

destroyDestination

protected void destroyDestination(ObjectName (src)  name)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getObjectName

protected ObjectName (src)  getObjectName(MBeanServer (src)  server,
                                   ObjectName (src)  name)
                            throws MalformedObjectNameException (src) 
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method if they only need to set their object name during MBean pre-registration.

Overrides:
getObjectName in class ServiceMBeanSupport (src)
Throws:
MalformedObjectNameException (src)

stopService

protected void stopService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)

getTopicObjectName

protected ObjectName (src)  getTopicObjectName(java.lang.String name)
                                 throws MalformedObjectNameException (src) 
Throws:
MalformedObjectNameException (src)

getQueueObjectName

protected ObjectName (src)  getQueueObjectName(java.lang.String name)
                                 throws MalformedObjectNameException (src) 
Throws:
MalformedObjectNameException (src)

getServiceController

protected ServiceControllerMBean getServiceController()

getInterceptor

public JMSServerInterceptor (src)  getInterceptor()
See Also:
InterceptorMBean.getInterceptor()

createService

protected void createService()
                      throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'create' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
createService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception
See Also:
ServiceMBeanSupport#createService()

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class InterceptorMBeanSupport (src)
Throws:
java.lang.Exception

destroyService

protected void destroyService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'destroy' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
destroyService in class ServiceMBeanSupport (src)

setMessageCounterHistoryDayLimit

public void setMessageCounterHistoryDayLimit(int days)
Sets the destination message counter history day limit <0: unlimited, =0: disabled, > 0 maximum day count

Parameters:
days - maximum day count

getMessageCounterHistoryDayLimit

public int getMessageCounterHistoryDayLimit()
Gets the destination message counter history day limit

Returns:
Maximum day count

getMessageCounter

public MessageCounter (src) [] getMessageCounter()
                                   throws java.lang.Exception
get message counter of all configured destinations

Throws:
java.lang.Exception

getMessageStatistics

public MessageStatistics (src) [] getMessageStatistics()
                                         throws java.lang.Exception
get message stats

Throws:
java.lang.Exception

listMessageCounter

public java.lang.String listMessageCounter()
                                    throws java.lang.Exception
List message counter of all configured destinations as HTML table

Throws:
java.lang.Exception

resetMessageCounter

public void resetMessageCounter()
Reset message counter of all configured destinations