Package org.eclipse.jetty.jmx
Class ConnectorServer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.jmx.ConnectorServer
- All Implemented Interfaces:
LifeCycle
LifeCycle wrapper for JMXConnectorServer.
This class provides the following facilities:
- participates in the
Server
lifecycle - starts the RMI registry if not there already
- allows to bind the RMI registry and the RMI server to the loopback interface
- makes it easy to use TLS for the JMX communication
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JMXConnectorServer
private JMXServiceURL
private final String
private Registry
private int
private int
private final SslContextFactory
private static final Logger
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionConnectorServer
(JMXServiceURL serviceURL, String name) Constructs a ConnectorServerConnectorServer
(JMXServiceURL svcUrl, Map<String, ?> environment, String name) Constructs a ConnectorServerConnectorServer
(JMXServiceURL svcUrl, Map<String, ?> environment, String name, SslContextFactory sslContextFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doStart()
void
doStop()
private String
normalizeHost
(String host) private String
startRegistry
(HostPort hostPort) private void
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toString
-
Field Details
-
RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE
- See Also:
-
LOG
-
_jmxURL
-
_environment
-
_objectName
-
_sslContextFactory
-
_registryPort
private int _registryPort -
_rmiPort
private int _rmiPort -
_connectorServer
-
_registry
-
-
Constructor Details
-
ConnectorServer
Constructs a ConnectorServer- Parameters:
serviceURL
- the address of the new ConnectorServername
- object name string to be assigned to ConnectorServer bean
-
ConnectorServer
Constructs a ConnectorServer- Parameters:
svcUrl
- the address of the new ConnectorServerenvironment
- a set of attributes to control the new ConnectorServer's behavior. This parameter can be null. Keys in this map must be Strings. The appropriate type of each associated value depends on the attribute. The contents of environment are not changed by this call.name
- object name string to be assigned to ConnectorServer bean
-
ConnectorServer
public ConnectorServer(JMXServiceURL svcUrl, Map<String, ?> environment, String name, SslContextFactory sslContextFactory)
-
-
Method Details
-
getAddress
-
doStart
- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
Exception
-
doStop
- Overrides:
doStop
in classAbstractLifeCycle
- Throws:
Exception
-
startRegistry
- Throws:
Exception
-
normalizeHost
- Throws:
UnknownHostException
-
stopRegistry
private void stopRegistry()
-