Class ConnectorServer

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
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConnectorServer(JMXServiceURL serviceURL, String objectName)
    Constructs a ConnectorServer
    ConnectorServer(JMXServiceURL serviceURL, Map<String,?> environment, String objectName)
    Constructs a ConnectorServer
    ConnectorServer(JMXServiceURL serviceURL, Map<String,?> environment, String objectName, org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
    Constructs a ConnectorServer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
     
     
    org.eclipse.jetty.util.ssl.SslContextFactory.Server
     
    void
    putAttribute(String name, Object value)
    Puts an attribute into the environment Map.
    void
    setObjectName(String objectName)
     
    void
    setSslContextFactory(org.eclipse.jetty.util.ssl.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE

      public static final String RMI_REGISTRY_CLIENT_SOCKET_FACTORY_ATTRIBUTE
      See Also:
  • Constructor Details

    • ConnectorServer

      public ConnectorServer(JMXServiceURL serviceURL, String objectName)
      Constructs a ConnectorServer
      Parameters:
      serviceURL - the address of the new ConnectorServer
      objectName - object name string to be assigned to ConnectorServer bean
    • ConnectorServer

      public ConnectorServer(JMXServiceURL serviceURL, Map<String,?> environment, String objectName)
      Constructs a ConnectorServer
      Parameters:
      serviceURL - the address of the new ConnectorServer
      environment - 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, org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
      Constructs a ConnectorServer
      Parameters:
      serviceURL - the address of the new ConnectorServer
      environment - 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
      sslContextFactory - the SslContextFactory.Server to use for secure communication
  • Method Details

    • getAddress

      public JMXServiceURL getAddress()
      Returns:
      the JMXServiceURL of this ConnectorServer
    • putAttribute

      public void putAttribute(String name, Object value)
      Puts an attribute into the environment Map.
      Parameters:
      name - the attribute name
      value - the attribute value
    • getObjectName

      public String getObjectName()
      Returns:
      the ObjectName of this ConnectorServer
    • setObjectName

      public void setObjectName(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 Exception
      Overrides:
      doStart in class org.eclipse.jetty.util.component.AbstractLifeCycle
      Throws:
      Exception
    • doStop

      public void doStop() throws Exception
      Overrides:
      doStop in class org.eclipse.jetty.util.component.AbstractLifeCycle
      Throws:
      Exception