org.jboss.mq.server.jmx
Class DestinationMBeanSupport

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.mq.server.jmx.DestinationMBeanSupport
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, DestinationMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean
Direct Known Subclasses:
Queue, Topic

public abstract class DestinationMBeanSupport
extends org.jboss.system.ServiceMBeanSupport
implements DestinationMBean, javax.management.MBeanRegistration

Super class for destination managers.

Version:
$Revision: 1.10.4.7 $
Author:
Peter Antman

Field Summary
protected  String destinationName
           
protected  javax.management.ObjectName jbossMQService
           
protected  boolean jndiBound
           
protected  String jndiName
           
protected  BasicQueueParameters parameters
          The basic parameters
protected  Element securityConf
           
protected  javax.management.ObjectName securityManager
          A optional security manager.
protected  SpyDestination spyDest
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
DestinationMBeanSupport()
           
 
Method Summary
 void createService()
           
 javax.management.ObjectName getDestinationManager()
          Get the value of JBossMQService.
 javax.management.ObjectName getExpiryDestination()
          Returns the expiry destination.
protected  InitialContext getInitialContext()
           
 boolean getInMemory()
          Retrieve the topic/queue in memory mode
 String getJNDIName()
          Gets the JNDI name use by this topic
 int getMaxDepth()
          Retrieve the maximum depth of the queue or individual subscriptions
abstract  MessageCounter[] getMessageCounter()
          Get destination message counter array
 int getMessageCounterHistoryDayLimit()
          Gets the destination message counter history day limit
abstract  MessageStatistics[] getMessageStatistics()
          Get destination stats array
protected  javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 Class getReceiversImpl()
          Returns the implementation class for receivers
 int getRecoveryRetries()
          Returns the recovery retries
 long getRedeliveryDelay()
          Returns the message redelivery delay, the delay in milliseconds before a rolled back or recovered message is redelivered
 int getRedeliveryLimit()
          Returns the message redelivery limit; the number of redelivery attempts before a message is moved to the DLQ.
protected  Element getSecurityConf()
           
protected  javax.management.ObjectName getSecurityManager()
           
protected  SpyDestination getSpyDest()
           
 String listMessageCounter()
          List destination message counter as HTML table
 String listMessageCounterHistory()
          List destination message counter history as HTML table
 void resetMessageCounter()
          Reset destination message counter
 void resetMessageCounterHistory()
          Reset destination message counter history
 void setDestinationManager(javax.management.ObjectName jbossMQService)
          Set the value of JBossMQService.
 void setExpiryDestination(javax.management.ObjectName expiryDestination)
          Sets the expiry destination.
 void setInMemory(boolean mode)
          Set the temporary topic/queue in memory mode
 void setJNDIName(String name)
          Sets the JNDI name for this topic
 void setMaxDepth(int depth)
          Set the maximum depth of the queue or individual subscriptions
 void setMessageCounterHistoryDayLimit(int days)
          Sets the destination message counter history day limit <0: unlimited, =0: disabled, > 0 maximum day count
 void setReceiversImpl(Class clazz)
          Sets the class implementating the receivers
 void setRecoveryRetries(int retries)
          Sets the class implementating the receivers
 void setRedeliveryDelay(long rDelay)
          Sets the Message redelivery delay in milliseconds.
 void setRedeliveryLimit(int limit)
          Sets the redelivery limit.
 void setSecurityConf(Element securityConf)
          Sets the security xml config
 void setSecurityManager(javax.management.ObjectName securityManager)
          Set the object name of the security manager.
protected  void setupExpiryDestination()
           
protected  void setupSecurityManager()
           
 void startService()
           
 void stopService()
           
protected  void teardownSecurityManager()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, destroyService, getDeploymentInfo, 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
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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.mq.server.jmx.DestinationMBean
removeAllMessages
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 

Field Detail

spyDest

protected SpyDestination spyDest

destinationName

protected String destinationName

jndiName

protected String jndiName

jndiBound

protected boolean jndiBound

jbossMQService

protected javax.management.ObjectName jbossMQService

securityConf

protected Element securityConf

parameters

protected BasicQueueParameters parameters
The basic parameters


securityManager

protected javax.management.ObjectName securityManager
A optional security manager. Must be set to use security conf.

Constructor Detail

DestinationMBeanSupport

public DestinationMBeanSupport()
Method Detail

getDestinationManager

public javax.management.ObjectName getDestinationManager()
Get the value of JBossMQService.

Specified by:
getDestinationManager in interface DestinationMBean
Returns:
value of JBossMQService.

setDestinationManager

public void setDestinationManager(javax.management.ObjectName jbossMQService)
Set the value of JBossMQService.

Specified by:
setDestinationManager in interface DestinationMBean
Parameters:
v - Value to assign to JBossMQService.

getSpyDest

protected SpyDestination getSpyDest()

setSecurityConf

public void setSecurityConf(Element securityConf)
                     throws Exception
Description copied from interface: DestinationMBean
Sets the security xml config

Specified by:
setSecurityConf in interface DestinationMBean
Throws:
Exception

getSecurityConf

protected Element getSecurityConf()

setSecurityManager

public void setSecurityManager(javax.management.ObjectName securityManager)
Description copied from interface: DestinationMBean
Set the object name of the security manager.

Specified by:
setSecurityManager in interface DestinationMBean

getSecurityManager

protected javax.management.ObjectName getSecurityManager()

createService

public void createService()
                   throws Exception
Overrides:
createService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

startService

public void startService()
                  throws Exception
Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

setupSecurityManager

protected void setupSecurityManager()
                             throws javax.management.InstanceNotFoundException,
                                    javax.management.MBeanException,
                                    javax.management.ReflectionException
Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

setupExpiryDestination

protected void setupExpiryDestination()
                               throws Exception
Throws:
Exception

stopService

public void stopService()
                 throws Exception
Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

teardownSecurityManager

protected void teardownSecurityManager()
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.MBeanException,
                                       javax.management.ReflectionException
Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

getObjectName

protected javax.management.ObjectName getObjectName(javax.management.MBeanServer server,
                                                    javax.management.ObjectName name)
                                             throws javax.management.MalformedObjectNameException
Overrides:
getObjectName in class org.jboss.system.ServiceMBeanSupport
Throws:
javax.management.MalformedObjectNameException

setJNDIName

public void setJNDIName(String name)
                 throws Exception
Sets the JNDI name for this topic

Specified by:
setJNDIName in interface DestinationMBean
Parameters:
name - Name to bind this topic to in the JNDI tree
Throws:
Exception

getInitialContext

protected InitialContext getInitialContext()
                                    throws NamingException
Throws:
NamingException

getJNDIName

public String getJNDIName()
Gets the JNDI name use by this topic

Specified by:
getJNDIName in interface DestinationMBean
Returns:
The JNDI name currently in use

getMessageCounter

public abstract MessageCounter[] getMessageCounter()
Get destination message counter array

Specified by:
getMessageCounter in interface DestinationMBean
Returns:
MessageCounter[]

getMessageStatistics

public abstract MessageStatistics[] getMessageStatistics()
                                                  throws Exception
Get destination stats array

Specified by:
getMessageStatistics in interface DestinationMBean
Returns:
MessageStatistics[]
Throws:
Exception - for any error

listMessageCounter

public String listMessageCounter()
List destination message counter as HTML table

Specified by:
listMessageCounter in interface DestinationMBean
Returns:
String

resetMessageCounter

public void resetMessageCounter()
Reset destination message counter

Specified by:
resetMessageCounter in interface DestinationMBean

listMessageCounterHistory

public String listMessageCounterHistory()
List destination message counter history as HTML table

Specified by:
listMessageCounterHistory in interface DestinationMBean
Returns:
String

resetMessageCounterHistory

public void resetMessageCounterHistory()
Reset destination message counter history

Specified by:
resetMessageCounterHistory in interface DestinationMBean

setMessageCounterHistoryDayLimit

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

Specified by:
setMessageCounterHistoryDayLimit in interface DestinationMBean
Parameters:
days - maximum day count

getMessageCounterHistoryDayLimit

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

Specified by:
getMessageCounterHistoryDayLimit in interface DestinationMBean
Returns:
Maximum day count

getMaxDepth

public int getMaxDepth()
Description copied from interface: DestinationMBean
Retrieve the maximum depth of the queue or individual subscriptions

Specified by:
getMaxDepth in interface DestinationMBean
Returns:
the maximum depth

setMaxDepth

public void setMaxDepth(int depth)
Description copied from interface: DestinationMBean
Set the maximum depth of the queue or individual subscriptions

Specified by:
setMaxDepth in interface DestinationMBean
Parameters:
depth - the maximum depth, zero means unlimited

getInMemory

public boolean getInMemory()
Description copied from interface: DestinationMBean
Retrieve the topic/queue in memory mode

Specified by:
getInMemory in interface DestinationMBean
Returns:
true for in memory

setInMemory

public void setInMemory(boolean mode)
Description copied from interface: DestinationMBean
Set the temporary topic/queue in memory mode

Specified by:
setInMemory in interface DestinationMBean

getRedeliveryLimit

public int getRedeliveryLimit()
Returns the message redelivery limit; the number of redelivery attempts before a message is moved to the DLQ.

Specified by:
getRedeliveryLimit in interface DestinationMBean

setRedeliveryLimit

public void setRedeliveryLimit(int limit)
Sets the redelivery limit.

Specified by:
setRedeliveryLimit in interface DestinationMBean

getRedeliveryDelay

public long getRedeliveryDelay()
Returns the message redelivery delay, the delay in milliseconds before a rolled back or recovered message is redelivered

Specified by:
getRedeliveryDelay in interface DestinationMBean

setRedeliveryDelay

public void setRedeliveryDelay(long rDelay)
Sets the Message redelivery delay in milliseconds.

Specified by:
setRedeliveryDelay in interface DestinationMBean

getReceiversImpl

public Class getReceiversImpl()
Description copied from interface: DestinationMBean
Returns the implementation class for receivers

Specified by:
getReceiversImpl in interface DestinationMBean

setReceiversImpl

public void setReceiversImpl(Class clazz)
Description copied from interface: DestinationMBean
Sets the class implementating the receivers

Specified by:
setReceiversImpl in interface DestinationMBean

getRecoveryRetries

public int getRecoveryRetries()
Description copied from interface: DestinationMBean
Returns the recovery retries

Specified by:
getRecoveryRetries in interface DestinationMBean

setRecoveryRetries

public void setRecoveryRetries(int retries)
Description copied from interface: DestinationMBean
Sets the class implementating the receivers

Specified by:
setRecoveryRetries in interface DestinationMBean

getExpiryDestination

public javax.management.ObjectName getExpiryDestination()
Description copied from interface: DestinationMBean
Returns the expiry destination.

Specified by:
getExpiryDestination in interface DestinationMBean

setExpiryDestination

public void setExpiryDestination(javax.management.ObjectName expiryDestination)
Description copied from interface: DestinationMBean
Sets the expiry destination.

Specified by:
setExpiryDestination in interface DestinationMBean


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.