- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.jmx.ConnectorServer
-
- All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle
public class ConnectorServer extends org.eclipse.jetty.util.component.AbstractLifeCycle
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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description ConnectorServer(javax.management.remote.JMXServiceURL serviceURL, java.lang.String objectName)
Constructs a ConnectorServerConnectorServer(javax.management.remote.JMXServiceURL serviceURL, java.util.Map<java.lang.String,?> environment, java.lang.String objectName)
Constructs a ConnectorServerConnectorServer(javax.management.remote.JMXServiceURL serviceURL, java.util.Map<java.lang.String,?> environment, java.lang.String objectName, org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
Constructs a ConnectorServer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doStart()
void
doStop()
javax.management.remote.JMXServiceURL
getAddress()
java.lang.String
getObjectName()
org.eclipse.jetty.util.ssl.SslContextFactory.Server
getSslContextFactory()
void
putAttribute(java.lang.String name, java.lang.Object value)
Puts an attribute into the environment Map.void
setObjectName(java.lang.String objectName)
void
setSslContextFactory(org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
-
-
-
Field Detail
-
RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE
public static final java.lang.String RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectorServer
public ConnectorServer(javax.management.remote.JMXServiceURL serviceURL, java.lang.String objectName)
Constructs a ConnectorServer- Parameters:
serviceURL
- the address of the new ConnectorServerobjectName
- object name string to be assigned to ConnectorServer bean
-
ConnectorServer
public ConnectorServer(javax.management.remote.JMXServiceURL serviceURL, java.util.Map<java.lang.String,?> environment, java.lang.String objectName)
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(javax.management.remote.JMXServiceURL serviceURL, java.util.Map<java.lang.String,?> environment, java.lang.String objectName, org.eclipse.jetty.util.ssl.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 Detail
-
getAddress
public javax.management.remote.JMXServiceURL getAddress()
- Returns:
- the JMXServiceURL of this ConnectorServer
-
putAttribute
public void putAttribute(java.lang.String name, java.lang.Object value)
Puts an attribute into the environment Map.- Parameters:
name
- the attribute namevalue
- the attribute value
-
getObjectName
public java.lang.String getObjectName()
- Returns:
- the ObjectName of this ConnectorServer
-
setObjectName
public void setObjectName(java.lang.String objectName)
- Parameters:
objectName
- the ObjectName of this ConnectorServer
-
getSslContextFactory
public org.eclipse.jetty.util.ssl.SslContextFactory.Server getSslContextFactory()
-
setSslContextFactory
public void setSslContextFactory(org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
-
doStart
public void doStart() throws java.lang.Exception
- Overrides:
doStart
in classorg.eclipse.jetty.util.component.AbstractLifeCycle
- Throws:
java.lang.Exception
-
doStop
public void doStop() throws java.lang.Exception
- Overrides:
doStop
in classorg.eclipse.jetty.util.component.AbstractLifeCycle
- Throws:
java.lang.Exception
-
-