|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.jmx.JMXConnectionUtil
public class JMXConnectionUtil
Provides JMX connection utilities.
| Constructor Summary | |
|---|---|
JMXConnectionUtil()
|
|
| Method Summary | |
|---|---|
static MBeanServerConnection |
attach(String id)
Using the JMX Attach API , connect to a local Java Virtual Machine. |
static void |
createJMXConnection(Configuration config)
Create a JMXConnectorServer, bound to
the RMI Registry created by an infrastructure service (Cybernode or
Monitor). |
static String |
getJMXServiceURL(int port,
String hostAddress)
Get a string that can be used as input for a JMXServiceURL |
static String[] |
listIDs()
Using the JMX Attach API , list the available local Java Virtual Machines. |
static String[] |
listManagedVMs()
Using the JMX Attach API , list the available local Java Virtual Machines. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMXConnectionUtil()
| Method Detail |
|---|
public static void createJMXConnection(Configuration config)
throws Exception
JMXConnectorServer, bound to
the RMI Registry created by an infrastructure service (Cybernode or
Monitor).
If JMXConnectorServer has been created, return immediately. If the JMXConnectorServer needs to be created, it will be bound to the RMI Registry, and set the org.rioproject.jmxServiceURL system property.
This utility uses the RegistryUtil class to
obtain the port to access the RMI Registry.
| Type: |
String |
| Default: |
If the java.rmi.server.hostname
property
is set, use this as the
default, otherwise use the value returned by InetAddress.getLocalHost() |
config - Configuration object to use
Exception - If there are errors reading the configuration, or
creating the JMXConnectorServer
public static String getJMXServiceURL(int port,
String hostAddress)
JMXServiceURL
port - The port the MBeanServer has been created onhostAddress - The host address the MBeanServer is running on
JMXServiceURL
public static MBeanServerConnection attach(String id)
throws IOException,
com.sun.tools.attach.AttachNotSupportedException,
com.sun.tools.attach.AgentInitializationException,
com.sun.tools.attach.AgentLoadException
This utility requires Java 6 or greater.
id - The identifier used to connect to the Java Virtual Machine
IOException - if the MBeanServerConnection cannot be created.
com.sun.tools.attach.AttachNotSupportedException - if the underlying provider either does not exist,
or if the provider attempts to attach to a Java virtual machine with which it is not compatible.
com.sun.tools.attach.AgentInitializationException - thrown when an agent fails to initialize in the
target Java virtual machine.
com.sun.tools.attach.AgentLoadException - when an agent cannot be loaded into the target Java virtual machine.public static String[] listIDs()
This utility requires Java 6 or greater.
public static String[] listManagedVMs()
This utility requires Java 6 or greater.
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||