public abstract class JmxUtilities
extends java.lang.Object
Constructor and Description |
---|
JmxUtilities() |
Modifier and Type | Method and Description |
---|---|
static javax.management.MBeanServerConnection |
connectMBeanServer(java.lang.String server)
Attempt to connect to a remote
MBeanServer . |
static javax.management.MBeanServer |
locateMBeanServer() |
static javax.management.MBeanServer |
locateMBeanServer(java.lang.String agent)
Attempt to find a locally running
MBeanServer . |
public static javax.management.MBeanServer locateMBeanServer(java.lang.String agent) throws MBeanServerException
MBeanServer
. Fails if no
MBeanServer
can be found. If multiple servers are found,
simply returns the first one from the list.agent
- the agent identifier of the MBeanServer to retrieve.
If this parameter is null
, all registered MBeanServers are
considered.MBeanServer
if any are foundMBeanServerException
- if no MBeanServer
could be foundMBeanServerFactory.findMBeanServer(String)
public static javax.management.MBeanServer locateMBeanServer() throws MBeanServerException
MBeanServerException
public static javax.management.MBeanServerConnection connectMBeanServer(java.lang.String server) throws MBeanServerException
MBeanServer
. Fails if no
MBeanServer
connection can be established.MBeanServerException