org.jppf.management
Class JMXServerImpl

java.lang.Object
  extended by org.jppf.management.JMXServerImpl

public class JMXServerImpl
extends Object

This class is a wrapper around a JMX management server. It is used essentially to hide the details of the remote management protocol used.

Author:
Laurent Cohen

Constructor Summary
JMXServerImpl(String namespaceSuffix)
          Initialize this JMX server with the specified namespace suffix.
JMXServerImpl(String namespaceSuffix, String id)
          Initialize this JMX server with the specified namespace suffix and uuid.
 
Method Summary
 String getId()
          Get a unique identifier for this management server.
 MBeanServer getServer()
          Get a reference to the MBean server.
 boolean isStopped()
          Determine whether this JMX server is stopped.
 void start(ClassLoader cl)
          Start the MBean server and associated resources.
 void stop()
          Stop the MBean server and associated resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXServerImpl

public JMXServerImpl(String namespaceSuffix)
Initialize this JMX server with the specified namespace suffix.

Parameters:
namespaceSuffix - used to distinguish between driver and node RMI registries.

JMXServerImpl

public JMXServerImpl(String namespaceSuffix,
                     String id)
Initialize this JMX server with the specified namespace suffix and uuid.

Parameters:
namespaceSuffix - used to distinguish between driver and node RMI registries.
id - the unique id of the driver or node holding this jmx server.
Method Detail

start

public void start(ClassLoader cl)
           throws Exception
Start the MBean server and associated resources.

Parameters:
cl - - the default classloader to be used by the JMX remote connector.
Throws:
Exception - if an error occurs when starting the server or one of its components.

stop

public void stop()
          throws Exception
Stop the MBean server and associated resources.

Throws:
Exception - if an error occurs when stopping the server or one of its components.

getServer

public MBeanServer getServer()
Get a reference to the MBean server.

Returns:
an MBeanServer instance.

isStopped

public boolean isStopped()
Determine whether this JMX server is stopped.

Returns:
true if this JMX server is stopped, false otherwise.

getId

public String getId()
Get a unique identifier for this management server. This id must be unique accross JPPF nodes and servers, and is used to identify this server if multiple nodes or servers share the same RMI registry.

Returns:
the id as a string.


Copyright © 2005-2010 JPPF Team.