Class JmxConnectionHandler

    • Field Detail

      • TRUST_MANAGER_ARRAY_KEY

        public static final String TRUST_MANAGER_ARRAY_KEY
        Key that may be placed into a JMX connection environment map to provide a custom javax.net.ssl.TrustManager array for a connection.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JmxConnectionHandler

        public JmxConnectionHandler()
        Creates a new instance of this JMX connection handler. It must be initialized before it may be used.
    • Method Detail

      • finalizeConnectionHandler

        public void finalizeConnectionHandler​(org.forgerock.i18n.LocalizableMessage finalizeReason)
        Description copied from class: ConnectionHandler
        Closes this connection handler so that it will no longer accept new client connections. Implementations should disconnect any existing connections.
        Specified by:
        finalizeConnectionHandler in class ConnectionHandler<JMXConnectionHandlerCfg>
        Parameters:
        finalizeReason - The reason that this connection handler should be finalized.
      • getComponentEntryDN

        public DN getComponentEntryDN()
        Retrieves the DN of the configuration entry with which this alert generator is associated.
        Specified by:
        getComponentEntryDN in class ConnectionHandler<JMXConnectionHandlerCfg>
        Returns:
        The DN of the configuration entry with which this alert generator is associated.
      • getKeyManagerProviderDN

        public DN getKeyManagerProviderDN()
        Retrieves the DN of the key manager provider that should be used for operations associated with this connection handler which need access to a key manager.
        Returns:
        The DN of the key manager provider that should be used for operations associated with this connection handler which need access to a key manager, or null if no key manager provider has been configured for this connection handler.
      • getListenAddress

        public InetAddress getListenAddress()
        Get the JMX connection handler's listen address: the one it was initialized with, until it restarts.
        Returns:
        Returns the JMX connection handler's listen address.
      • getListenPort

        public int getListenPort()
        Get the JMX connection handler's listen port.
        Returns:
        Returns the JMX connection handler's listen port.
      • getRmiPort

        public int getRmiPort()
        Get the JMX connection handler's rmi port.
        Returns:
        Returns the JMX connection handler's rmi port.
      • getRMIConnector

        public RmiConnector getRMIConnector()
        Get the JMX connection handler's RMI connector.
        Returns:
        Returns the JMX connection handler's RMI connector.
      • getSSLServerCertNicknames

        public SortedSet<String> getSSLServerCertNicknames()
        Retrieves the nicknames of the server certificates that should be used in conjunction with this JMX connection handler.
        Returns:
        The nicknames of the server certificates that should be used in conjunction with this JMX connection handler.
      • getConnectionHandlerName

        public String getConnectionHandlerName()
        Description copied from class: ConnectionHandler
        Retrieves a name that may be used to refer to this connection handler. Every connection handler instance (even handlers of the same type) must have a unique name.
        Specified by:
        getConnectionHandlerName in class ConnectionHandler<JMXConnectionHandlerCfg>
        Returns:
        A unique name that may be used to refer to this connection handler.
      • getProtocol

        public String getProtocol()
        Description copied from class: ConnectionHandler
        Retrieves the name of the protocol used to communicate with clients. It should take into account any special naming that may be needed to express any security mechanisms or other constraints in place (e.g., "LDAPS" for LDAP over SSL).
        Specified by:
        getProtocol in class ConnectionHandler<JMXConnectionHandlerCfg>
        Returns:
        The name of the protocol used to communicate with clients.
      • getListeners

        public Collection<HostPort> getListeners()
        Description copied from class: ConnectionHandler
        Retrieves information about the listener(s) that will be used to accept client connections.
        Specified by:
        getListeners in class ConnectionHandler<JMXConnectionHandlerCfg>
        Returns:
        Information about the listener(s) that will be used to accept client connections, or an empty list if this connection handler does not accept connections from network clients.
      • isConfigurationAcceptable

        public boolean isConfigurationAcceptable​(ConnectionHandlerCfg configuration,
                                                 List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from class: ConnectionHandler
        Indicates whether the provided configuration is acceptable for this connection handler. It should be possible to call this method on an uninitialized connection handler instance in order to determine whether the connection handler would be able to use the provided configuration.

        Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.
        Overrides:
        isConfigurationAcceptable in class ConnectionHandler<JMXConnectionHandlerCfg>
        Parameters:
        configuration - The connection handler configuration for which to make the determination.
        unacceptableReasons - A list that may be used to hold the reasons that the provided configuration is not acceptable.
        Returns:
        true if the provided configuration is acceptable for this connection handler, or false if not.
      • isConfigurationChangeAcceptable

        public boolean isConfigurationChangeAcceptable​(JMXConnectionHandlerCfg config,
                                                       List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationChangeListener
        Indicates whether the proposed change to the configuration is acceptable to this change listener.
        Specified by:
        isConfigurationChangeAcceptable in interface ConfigurationChangeListener<JMXConnectionHandlerCfg>
        Parameters:
        config - The new configuration containing the changes.
        unacceptableReasons - A list that can be used to hold messages about why the provided configuration is not acceptable.
        Returns:
        Returns true if the proposed change is acceptable, or false if it is not.
      • isUseSSL

        public boolean isUseSSL()
        Determines whether clients are allowed to connect over JMX using SSL.
        Returns:
        Returns true if clients are allowed to connect over JMX using SSL.
      • processServerShutdown

        public void processServerShutdown​(org.forgerock.i18n.LocalizableMessage reason)
        Description copied from interface: ServerShutdownListener
        Indicates that the Directory Server has received a request to stop running and that this shutdown listener should take any action necessary to prepare for it.
        Specified by:
        processServerShutdown in interface ServerShutdownListener
        Parameters:
        reason - The human-readable reason for the shutdown.
      • registerClientConnection

        public void registerClientConnection​(ClientConnection connection)
        Registers a client connection with this JMX connection handler.
        Parameters:
        connection - The client connection.
      • unregisterClientConnection

        public void unregisterClientConnection​(ClientConnection connection)
        Unregisters a client connection from this JMX connection handler.
        Parameters:
        connection - The client connection.