org.apache.activemq.broker.jmx
Class ManagementContext

java.lang.Object
  extended by org.apache.activemq.broker.jmx.ManagementContext
All Implemented Interfaces:
Service

public class ManagementContext
extends Object
implements Service

A Flow provides different dispatch policies within the NMR

Version:
$Revision$

Field Summary
static String DEFAULT_DOMAIN
          Default activemq domain
 
Constructor Summary
ManagementContext()
           
ManagementContext(MBeanServer server)
           
 
Method Summary
 ObjectName createCustomComponentMBeanName(String type, String name)
          Formulate and return the MBean ObjectName of a custom control MBean
protected  MBeanServer createMBeanServer()
           
protected  MBeanServer findMBeanServer()
           
 MBeanServer findTigerMBeanServer()
           
 String getConnectorPath()
           
 int getConnectorPort()
           
 String getJmxDomainName()
           
 MBeanServer getMBeanServer()
          Get the MBeanServer
 int getRmiServerPort()
           
static ObjectName getSystemObjectName(String domainName, String containerName, Class theClass)
          Retrive an System ObjectName
 boolean isCreateConnector()
           
 boolean isCreateMBeanServer()
           
 boolean isFindTigerMbeanServer()
           
 boolean isUseMBeanServer()
           
 void setConnectorPath(String connectorPath)
           
 void setConnectorPort(int connectorPort)
           
 void setCreateConnector(boolean createConnector)
           
 void setCreateMBeanServer(boolean enableJMX)
           
 void setFindTigerMbeanServer(boolean findTigerMbeanServer)
          Enables/disables the searching for the Java 5 platform MBeanServer
 void setJmxDomainName(String jmxDomainName)
           
 void setMBeanServer(MBeanServer beanServer)
          Set the MBeanServer
 void setRmiServerPort(int rmiServerPort)
           
 void setUseMBeanServer(boolean useMBeanServer)
           
 void start()
           
 void stop()
           
 void unregisterMBean(ObjectName name)
          Unregister an MBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DOMAIN

public static final String DEFAULT_DOMAIN
Default activemq domain

See Also:
Constant Field Values
Constructor Detail

ManagementContext

public ManagementContext()

ManagementContext

public ManagementContext(MBeanServer server)
Method Detail

start

public void start()
           throws IOException
Specified by:
start in interface Service
Throws:
IOException

stop

public void stop()
          throws IOException
Specified by:
stop in interface Service
Throws:
IOException

getJmxDomainName

public String getJmxDomainName()
Returns:
Returns the jmxDomainName.

setJmxDomainName

public void setJmxDomainName(String jmxDomainName)
Parameters:
jmxDomainName - The jmxDomainName to set.

getMBeanServer

public MBeanServer getMBeanServer()
Get the MBeanServer

Returns:
the MBeanServer

setMBeanServer

public void setMBeanServer(MBeanServer beanServer)
Set the MBeanServer

Parameters:
beanServer -

isUseMBeanServer

public boolean isUseMBeanServer()
Returns:
Returns the useMBeanServer.

setUseMBeanServer

public void setUseMBeanServer(boolean useMBeanServer)
Parameters:
useMBeanServer - The useMBeanServer to set.

isCreateMBeanServer

public boolean isCreateMBeanServer()
Returns:
Returns the createMBeanServer flag.

setCreateMBeanServer

public void setCreateMBeanServer(boolean enableJMX)
Parameters:
enableJMX - Set createMBeanServer.

isFindTigerMbeanServer

public boolean isFindTigerMbeanServer()

setFindTigerMbeanServer

public void setFindTigerMbeanServer(boolean findTigerMbeanServer)
Enables/disables the searching for the Java 5 platform MBeanServer


createCustomComponentMBeanName

public ObjectName createCustomComponentMBeanName(String type,
                                                 String name)
Formulate and return the MBean ObjectName of a custom control MBean

Parameters:
type -
name -
Returns:
the JMX ObjectName of the MBean, or null if customName is invalid.

getSystemObjectName

public static ObjectName getSystemObjectName(String domainName,
                                             String containerName,
                                             Class theClass)
                                      throws MalformedObjectNameException,
                                             NullPointerException
Retrive an System ObjectName

Parameters:
domainName -
containerName -
theClass -
Returns:
the ObjectName
Throws:
MalformedObjectNameException
NullPointerException

unregisterMBean

public void unregisterMBean(ObjectName name)
                     throws JMException
Unregister an MBean

Parameters:
name -
Throws:
JMException

findMBeanServer

protected MBeanServer findMBeanServer()

findTigerMBeanServer

public MBeanServer findTigerMBeanServer()

createMBeanServer

protected MBeanServer createMBeanServer()
                                 throws MalformedObjectNameException,
                                        IOException
Returns:
Throws:
NullPointerException
MalformedObjectNameException
IOException

getConnectorPath

public String getConnectorPath()

setConnectorPath

public void setConnectorPath(String connectorPath)

getConnectorPort

public int getConnectorPort()

setConnectorPort

public void setConnectorPort(int connectorPort)

getRmiServerPort

public int getRmiServerPort()

setRmiServerPort

public void setRmiServerPort(int rmiServerPort)

isCreateConnector

public boolean isCreateConnector()

setCreateConnector

public void setCreateConnector(boolean createConnector)


Copyright © 2009. All Rights Reserved.