public final class JmxConnectionHandler extends ConnectionHandler<JMXConnectionHandlerCfg> implements ServerShutdownListener, ConfigurationChangeListener<JMXConnectionHandlerCfg>
DirectoryThread.Factory
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static 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. |
DIRECTORY_THREAD_GROUP
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
JmxConnectionHandler()
Creates a new instance of this JMX connection handler.
|
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(JMXConnectionHandlerCfg config)
Applies the configuration changes to this change listener.
|
void |
finalizeConnectionHandler(LocalizableMessage finalizeReason)
Closes this connection handler so that it will no longer accept
new client connections.
|
Collection<ClientConnection> |
getClientConnections()
Retrieves the set of active client connections that have been
established through this connection handler.
|
DN |
getComponentEntryDN()
Retrieves the DN of the configuration entry with which this alert
generator is associated.
|
String |
getConnectionHandlerName()
Retrieves a name that may be used to refer to this connection
handler.
|
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.
|
InetAddress |
getListenAddress()
Get the JMX connection handler's listen address.
|
Collection<HostPort> |
getListeners()
Retrieves information about the listener(s) that will be used to
accept client connections.
|
int |
getListenPort()
Get the JMX connection handler's listen port.
|
String |
getProtocol()
Retrieves the name of the protocol used to communicate with
clients.
|
RmiConnector |
getRMIConnector()
Get the JMX connection handler's RMI connector.
|
int |
getRmiPort()
Get the JMX connection handler's rmi port.
|
String |
getShutdownListenerName()
Retrieves the human-readable name for this shutdown listener.
|
SortedSet<String> |
getSSLServerCertNicknames()
Retrieves the nicknames of the server certificates that should be
used in conjunction with this JMX connection handler.
|
void |
initializeConnectionHandler(ServerContext serverContext,
JMXConnectionHandlerCfg config)
Initializes this connection handler provider based on the
information in the provided connection handler configuration.
|
boolean |
isConfigurationAcceptable(ConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for
this connection handler.
|
boolean |
isConfigurationChangeAcceptable(JMXConnectionHandlerCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is
acceptable to this change listener.
|
boolean |
isUseSSL()
Determines whether or not clients are allowed to connect over JMX
using SSL.
|
void |
processServerShutdown(LocalizableMessage reason)
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.
|
void |
registerClientConnection(ClientConnection connection)
Registers a client connection with this JMX connection handler.
|
void |
run()
Operates in a loop, accepting new connections and ensuring that
requests on those connections are handled properly.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the
provided buffer.
|
void |
unregisterClientConnection(ClientConnection connection)
Unregisters a client connection from this JMX connection handler.
|
getConnectionHandlerMonitor, getEnabledSSLCipherSuites, getEnabledSSLProtocols, getNumRequestHandlers, isAdminConnectionHandler, setAdminConnectionHandler, setConnectionHandlerMonitor, toString
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, initiateShutdown, isShutdownInitiated, setAssociatedTask, startWork, stopWork
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public static final String TRUST_MANAGER_ARRAY_KEY
javax.net.ssl.TrustManager
array
for a connection.public JmxConnectionHandler()
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(JMXConnectionHandlerCfg config)
applyConfigurationChange
in interface ConfigurationChangeListener<JMXConnectionHandlerCfg>
config
- The new configuration containing the changes.public void finalizeConnectionHandler(LocalizableMessage finalizeReason)
finalizeConnectionHandler
in class ConnectionHandler<JMXConnectionHandlerCfg>
finalizeReason
- The reason that this connection handler should be
finalized.public Collection<ClientConnection> getClientConnections()
getClientConnections
in class ConnectionHandler<JMXConnectionHandlerCfg>
public DN getComponentEntryDN()
getComponentEntryDN
in class ConnectionHandler<JMXConnectionHandlerCfg>
public DN getKeyManagerProviderDN()
null
if no
key manager provider has been configured for this
connection handler.public InetAddress getListenAddress()
public int getListenPort()
public int getRmiPort()
public RmiConnector getRMIConnector()
public String getShutdownListenerName()
getShutdownListenerName
in interface ServerShutdownListener
public SortedSet<String> getSSLServerCertNicknames()
public void initializeConnectionHandler(ServerContext serverContext, JMXConnectionHandlerCfg config) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
initializeConnectionHandler
in class ConnectionHandler<JMXConnectionHandlerCfg>
serverContext
- The server context.config
- The connection handler configuration that contains the
information to use to initialize this connection
handler.org.forgerock.opendj.config.server.ConfigException
- If an unrecoverable problem arises in the process of
performing the initialization as a result of the server
configuration.InitializationException
- If a problem occurs during initialization that is not
related to the server configuration.public String getConnectionHandlerName()
getConnectionHandlerName
in class ConnectionHandler<JMXConnectionHandlerCfg>
public String getProtocol()
getProtocol
in class ConnectionHandler<JMXConnectionHandlerCfg>
public Collection<HostPort> getListeners()
getListeners
in class ConnectionHandler<JMXConnectionHandlerCfg>
public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationAcceptable
in class ConnectionHandler<JMXConnectionHandlerCfg>
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.true
if the provided configuration is acceptable
for this connection handler, or false
if not.public boolean isConfigurationChangeAcceptable(JMXConnectionHandlerCfg config, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<JMXConnectionHandlerCfg>
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.true
if the proposed change is
acceptable, or false
if it is not.public boolean isUseSSL()
true
if clients are allowed to
connect over JMX using SSL.public void processServerShutdown(LocalizableMessage reason)
processServerShutdown
in interface ServerShutdownListener
reason
- The human-readable reason for the shutdown.public void registerClientConnection(ClientConnection connection)
connection
- The client connection.public void unregisterClientConnection(ClientConnection connection)
connection
- The client connection.public void run()
run
in interface Runnable
run
in class ConnectionHandler<JMXConnectionHandlerCfg>
public void toString(StringBuilder buffer)
toString
in class ConnectionHandler<JMXConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.