Package org.jppf.management
Class AbstractJMXServer
java.lang.Object
org.jppf.management.AbstractJMXServer
- All Implemented Interfaces:
JMXServer
- Direct Known Subclasses:
JMXMPServer,JPPFJMXServer
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TypedPropertiesThe configuration to use.protected JMXConnectorServerThe JMX connector server.protected MBeanServerForwarderAn optionalMBeanServerForwarderassociated with theJMXConnectorServer.protected static LockUsed to synchronize lookup for available port.protected StringThe host interface on which the JMX server is listeneing for connections.protected intThe port on which the connector is listening for connections from remote clients.protected final MBeanServerThe mbean server.protected booleanDetermines whether JMX should be used over an SSL/TLS connection.protected booleanDetermines whether this JMX server is stopped.protected StringThis server's unique id. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractJMXServer(TypedProperties config, MBeanServer mbeanServer) -
Method Summary
Modifier and TypeMethodDescriptionGet the JMX connector server.Get the environment used at the creation of this server.Get the host interface on which the JMX server is listeneing for connections.intGet the port on which the connector is listening for connections from remote clients.Get a reference to the MBean server.Get an optionalMBeanServerForwarderassociated with the underlying remote connector server.getUuid()Get a unique identifier for this management server.booleanDetermine whether this JMX server is stopped.protected voidstartConnectorServer(String protocol, Map<String, Object> env) Start the underlying conector server.voidstop()Stop the MBean server and associated resources.
-
Field Details
-
lock
Used to synchronize lookup for available port. -
mbeanServer
The mbean server. -
connectorServer
The JMX connector server. -
stopped
protected boolean stoppedDetermines whether this JMX server is stopped. -
uuid
This server's unique id. -
managementHost
The host interface on which the JMX server is listeneing for connections. -
managementPort
protected int managementPortThe port on which the connector is listening for connections from remote clients. -
ssl
protected boolean sslDetermines whether JMX should be used over an SSL/TLS connection. -
forwarder
An optionalMBeanServerForwarderassociated with theJMXConnectorServer. -
config
The configuration to use.
-
-
Constructor Details
-
AbstractJMXServer
- Parameters:
config- the configuration to use.mbeanServer- the mbean server to use.
-
-
Method Details
-
stop
Description copied from interface:JMXServerStop the MBean server and associated resources. -
getMBeanServer
Description copied from interface:JMXServerGet a reference to the MBean server.- Specified by:
getMBeanServerin interfaceJMXServer- Returns:
- an
MBeanServerinstance.
-
isStopped
public boolean isStopped()Description copied from interface:JMXServerDetermine whether this JMX server is stopped. -
getUuid
Description copied from interface:JMXServerGet a unique identifier for this management server. This id must be unique across JPPF nodes and servers. -
getManagementPort
public int getManagementPort()Description copied from interface:JMXServerGet the port on which the connector is listening for connections from remote clients.- Specified by:
getManagementPortin interfaceJMXServer- Returns:
- the port number as an int.
-
getManagementHost
Description copied from interface:JMXServerGet the host interface on which the JMX server is listeneing for connections.- Specified by:
getManagementHostin interfaceJMXServer- Returns:
- the host as a string.
-
getConnectorServer
Description copied from interface:JMXServerGet the JMX connector server.- Specified by:
getConnectorServerin interfaceJMXServer- Returns:
- a
JMXConnectorServerinstance.
-
getMBeanServerForwarder
Description copied from interface:JMXServerGet an optionalMBeanServerForwarderassociated with the underlying remote connector server.- Specified by:
getMBeanServerForwarderin interfaceJMXServer- Returns:
- an
MBeanServerForwarderinstance, ornullif node is associated with this jmx server.
-
getEnvironment
Description copied from interface:JMXServerGet the environment used at the creation of this server.- Specified by:
getEnvironmentin interfaceJMXServer- Returns:
- a JMX environment map.
-
startConnectorServer
Start the underlying conector server.- Parameters:
protocol- the connector server protocol.env- the environment parameters passed on to the server.- Throws:
Exception- if any eror occyrs.
-