org.objectweb.easybeans.jmx
Class JMXRemoteHelper

java.lang.Object
  extended by org.objectweb.easybeans.jmx.JMXRemoteHelper

public final class JMXRemoteHelper
extends java.lang.Object

This helper class allow to start a JMX remote connector allowing to connect remote applications. This could be for example a JSR88 provider.

Author:
Florent Benoit

Field Summary
private static java.lang.String DEFAULT_NAME_CONNECTOR
          ObjectName for the connector.
private static java.lang.String DEFAULT_RMI
          Default RMI host.
private static javax.management.remote.JMXConnectorServer jmxConnectorServer
          JMX connector (server side).
private static JLog logger
          Logger.
private static java.lang.String PREFIX_URL
          Prefix for the URL.
private static java.lang.String SUFFIX_URL
          Suffix for the URL.
 
Constructor Summary
private JMXRemoteHelper()
          Utility class, no public constructor.
 
Method Summary
private static javax.management.ObjectName getConnectorObjectName()
           
private static void init(RegistryComponent registryComponent)
          Build a new JMX Remote connector.
static void startConnector(RegistryComponent registryComponent)
          Start a JMX connector (used to do remote administration).
static void stopConnector()
          Start a JMX connector (used to do remote administration).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static JLog logger
Logger.


jmxConnectorServer

private static javax.management.remote.JMXConnectorServer jmxConnectorServer
JMX connector (server side).


PREFIX_URL

private static final java.lang.String PREFIX_URL
Prefix for the URL.

See Also:
Constant Field Values

DEFAULT_RMI

private static final java.lang.String DEFAULT_RMI
Default RMI host.

See Also:
Constant Field Values

SUFFIX_URL

private static final java.lang.String SUFFIX_URL
Suffix for the URL.

See Also:
Constant Field Values

DEFAULT_NAME_CONNECTOR

private static final java.lang.String DEFAULT_NAME_CONNECTOR
ObjectName for the connector.

See Also:
Constant Field Values
Constructor Detail

JMXRemoteHelper

private JMXRemoteHelper()
Utility class, no public constructor.

Method Detail

init

private static void init(RegistryComponent registryComponent)
                  throws JMXRemoteException
Build a new JMX Remote connector.

Parameters:
registryComponent - to get the provider URL.
Throws:
JMXRemoteException - if jmx connector can't be built.

startConnector

public static void startConnector(RegistryComponent registryComponent)
                           throws JMXRemoteException
Start a JMX connector (used to do remote administration).

Parameters:
registryComponent - to get the provider URL.
Throws:
JMXRemoteException - if the connector can't be started.

stopConnector

public static void stopConnector()
                          throws JMXRemoteException
Start a JMX connector (used to do remote administration).

Throws:
JMXRemoteException - if the connector can't be started.

getConnectorObjectName

private static javax.management.ObjectName getConnectorObjectName()
                                                           throws JMXRemoteException
Returns:
Returns the Connector ObjectName.
Throws:
JMXRemoteException - if unable to create the ObjectName.