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 RMI communication
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConnectorServer
(JMXServiceURL serviceURL, String objectName) Constructs a ConnectorServerConnectorServer
(JMXServiceURL serviceURL, Map<String, ?> environment, String objectName) Constructs a ConnectorServerConnectorServer
(JMXServiceURL serviceURL, Map<String, ?> environment, String objectName, SslContextFactory.Server sslContextFactory) Constructs a ConnectorServer -
Method Summary
Modifier and TypeMethodDescriptionvoid
doStart()
Method to override to start the lifecyclevoid
doStop()
Method to override to stop the lifecycleGet the JMXServiceURL of this ConnectorServer.Get the ObjectName of this ConnectorServer.void
putAttribute
(String name, Object value) Puts an attribute into the environment Map.void
setObjectName
(String objectName) Set the ObjectName of this ConnectorServer.void
setSslContextFactory
(SslContextFactory.Server sslContextFactory) Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop, toString
-
Field Details
-
RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
ConnectorServer
Constructs a ConnectorServer- Parameters:
serviceURL
- the address of the new ConnectorServerobjectName
- object name string to be assigned to ConnectorServer bean
-
ConnectorServer
Constructs a ConnectorServer- Parameters:
serviceURL
- 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.objectName
- object name string to be assigned to ConnectorServer bean
-
ConnectorServer
public ConnectorServer(JMXServiceURL serviceURL, Map<String, ?> environment, String objectName, SslContextFactory.Server sslContextFactory) Constructs a ConnectorServer- Parameters:
serviceURL
- 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.objectName
- object name string to be assigned to ConnectorServer beansslContextFactory
- the SslContextFactory.Server to use for secure communication
-
-
Method Details
-
getAddress
Get the JMXServiceURL of this ConnectorServer.- Returns:
- the JMXServiceURL of this ConnectorServer
-
putAttribute
Puts an attribute into the environment Map.- Parameters:
name
- the attribute namevalue
- the attribute value
-
getObjectName
Get the ObjectName of this ConnectorServer.- Returns:
- the ObjectName of this ConnectorServer
-
setObjectName
Set the ObjectName of this ConnectorServer.- Parameters:
objectName
- the ObjectName of this ConnectorServer
-
getSslContextFactory
-
setSslContextFactory
-
doStart
Description copied from class:AbstractLifeCycle
Method to override to start the lifecycle- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
AbstractLifeCycle.StopException
- If thrown, the lifecycle will immediately be stopped.Exception
- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:AbstractLifeCycle
Method to override to stop the lifecycle- Overrides:
doStop
in classAbstractLifeCycle
- Throws:
Exception
- If there was a problem stopping. Will cause a transition to FAILED state
-