|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.broker.jmx.ManagementContext
public class ManagementContext
An abstraction over JMX mbean registration
| 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()
|
Object |
getAttribute(ObjectName name,
String attribute)
|
String |
getBrokerName()
Gets the broker name this context is used by, may be null if the broker name was not set. |
String |
getConnectorHost()
Get the connectorHost |
String |
getConnectorPath()
|
int |
getConnectorPort()
|
Map<String,?> |
getEnvironment()
|
String |
getJmxDomainName()
|
protected MBeanServer |
getMBeanServer()
Get the MBeanServer |
ObjectInstance |
getObjectInstance(ObjectName name)
|
int |
getRmiServerPort()
|
static ObjectName |
getSystemObjectName(String domainName,
String containerName,
Class<?> theClass)
Retrieve an System ObjectName |
boolean |
isAllowRemoteAddressInMBeanNames()
|
boolean |
isConnectorStarted()
|
boolean |
isCreateConnector()
|
boolean |
isCreateMBeanServer()
|
boolean |
isFindTigerMbeanServer()
|
boolean |
isUseMBeanServer()
|
Object |
newProxyInstance(ObjectName objectName,
Class<?> interfaceClass,
boolean notificationBroadcaster)
|
Set<ObjectName> |
queryNames(ObjectName name,
QueryExp query)
|
ObjectInstance |
registerMBean(Object bean,
ObjectName name)
|
void |
setAllowRemoteAddressInMBeanNames(boolean allowRemoteAddressInMBeanNames)
|
void |
setBrokerName(String brokerName)
Sets the broker name this context is being used by. |
void |
setConnectorHost(String connectorHost)
Set the connectorHost |
void |
setConnectorPath(String connectorPath)
|
void |
setConnectorPort(int connectorPort)
|
void |
setCreateConnector(boolean createConnector)
|
void |
setCreateMBeanServer(boolean enableJMX)
|
void |
setEnvironment(Map<String,?> environment)
|
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 |
|---|
public static final String DEFAULT_DOMAIN
| Constructor Detail |
|---|
public ManagementContext()
public ManagementContext(MBeanServer server)
| Method Detail |
|---|
public void start()
throws IOException
start in interface ServiceIOException
public void stop()
throws Exception
stop in interface ServiceExceptionpublic String getBrokerName()
public void setBrokerName(String brokerName)
public String getJmxDomainName()
public void setJmxDomainName(String jmxDomainName)
jmxDomainName - The jmxDomainName to set.protected MBeanServer getMBeanServer()
public void setMBeanServer(MBeanServer beanServer)
beanServer - public boolean isUseMBeanServer()
public void setUseMBeanServer(boolean useMBeanServer)
useMBeanServer - The useMBeanServer to set.public boolean isCreateMBeanServer()
public void setCreateMBeanServer(boolean enableJMX)
enableJMX - Set createMBeanServer.public boolean isFindTigerMbeanServer()
public boolean isConnectorStarted()
public void setFindTigerMbeanServer(boolean findTigerMbeanServer)
public ObjectName createCustomComponentMBeanName(String type,
String name)
type - name -
null if
customName is invalid.
public static ObjectName getSystemObjectName(String domainName,
String containerName,
Class<?> theClass)
throws MalformedObjectNameException,
NullPointerException
domainName - containerName - theClass -
MalformedObjectNameException
NullPointerException
public Object newProxyInstance(ObjectName objectName,
Class<?> interfaceClass,
boolean notificationBroadcaster)
public Object getAttribute(ObjectName name,
String attribute)
throws Exception
Exception
public ObjectInstance registerMBean(Object bean,
ObjectName name)
throws Exception
Exception
public Set<ObjectName> queryNames(ObjectName name,
QueryExp query)
throws Exception
Exception
public ObjectInstance getObjectInstance(ObjectName name)
throws InstanceNotFoundException
InstanceNotFoundException
public void unregisterMBean(ObjectName name)
throws JMException
name -
JMExceptionprotected MBeanServer findMBeanServer()
public MBeanServer findTigerMBeanServer()
protected MBeanServer createMBeanServer()
throws MalformedObjectNameException,
IOException
NullPointerException
MalformedObjectNameException
IOExceptionpublic String getConnectorPath()
public void setConnectorPath(String connectorPath)
public int getConnectorPort()
public void setConnectorPort(int connectorPort)
public int getRmiServerPort()
public void setRmiServerPort(int rmiServerPort)
public boolean isCreateConnector()
public void setCreateConnector(boolean createConnector)
public String getConnectorHost()
public void setConnectorHost(String connectorHost)
connectorHost - the connectorHost to setpublic Map<String,?> getEnvironment()
public void setEnvironment(Map<String,?> environment)
public boolean isAllowRemoteAddressInMBeanNames()
public void setAllowRemoteAddressInMBeanNames(boolean allowRemoteAddressInMBeanNames)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||