|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.opends.server.api.DirectoryThread
org.opends.server.api.ConnectionHandler<JMXConnectionHandlerCfg>
org.opends.server.protocols.jmx.JmxConnectionHandler
public final class JmxConnectionHandler
This class defines a connection handler that will be used for communicating with administrative clients over JMX. The connection handler is responsible for accepting new connections, reading requests from the clients and parsing them as operations. A single request handler should be used.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static java.lang.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. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
JmxConnectionHandler()
Creates a new instance of this JMX connection handler. |
Method Summary | |
---|---|
ConfigChangeResult |
applyConfigurationChange(JMXConnectionHandlerCfg config)
Applies the configuration changes to this change listener. |
void |
finalizeConnectionHandler(Message finalizeReason,
boolean closeConnections)
Closes this connection handler so that it will no longer accept new client connections. |
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getAlerts()
Retrieves information about the set of alerts that this generator may produce. |
java.lang.String |
getClassName()
Retrieves the fully-qualified name of the Java class for this alert generator implementation. |
java.util.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. |
java.lang.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. |
java.util.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. |
java.lang.String |
getProtocol()
Retrieves the name of the protocol used to communicate with clients. |
RmiConnector |
getRMIConnector()
Get the JMX connection handler's RMI connector. |
java.lang.String |
getShutdownListenerName()
Retrieves the human-readable name for this shutdown listener. |
java.lang.String |
getSSLServerCertNickname()
Retrieves the nickname of the server certificate that should be used in conjunction with this JMX connection handler. |
void |
initializeConnectionHandler(JMXConnectionHandlerCfg config)
Initializes this connection handler provider based on the information in the provided connection handler configuration. |
boolean |
isConfigurationAcceptable(ConnectionHandlerCfg configuration,
java.util.List<Message> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this connection handler. |
boolean |
isConfigurationChangeAcceptable(JMXConnectionHandlerCfg config,
java.util.List<Message> 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(Message 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(java.lang.StringBuilder buffer)
Appends a string representation of this connection handler to the provided buffer. |
Methods inherited from class org.opends.server.api.ConnectionHandler |
---|
getConnectionHandlerMonitor, setConnectionHandlerMonitor, toString |
Methods inherited from class org.opends.server.api.DirectoryThread |
---|
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TRUST_MANAGER_ARRAY_KEY
javax.net.ssl.TrustManager
array
for a connection.
Constructor Detail |
---|
public JmxConnectionHandler()
Method Detail |
---|
public ConfigChangeResult applyConfigurationChange(JMXConnectionHandlerCfg config)
applyConfigurationChange
in interface ConfigurationChangeListener<JMXConnectionHandlerCfg>
config
- The new configuration containing the changes.
public void finalizeConnectionHandler(Message finalizeReason, boolean closeConnections)
finalizeConnectionHandler
in class ConnectionHandler<JMXConnectionHandlerCfg>
finalizeReason
- The reason that this connection handler should be
finalized.closeConnections
- Indicates whether any established client connections
associated with the connection handler should also be
closed.public java.util.LinkedHashMap<java.lang.String,java.lang.String> getAlerts()
getAlerts
in interface AlertGenerator
public java.lang.String getClassName()
getClassName
in interface AlertGenerator
public java.util.Collection<ClientConnection> getClientConnections()
getClientConnections
in class ConnectionHandler<JMXConnectionHandlerCfg>
public DN getComponentEntryDN()
getComponentEntryDN
in interface AlertGenerator
public DN getKeyManagerProviderDN()
null
if no
key manager provider has been configured for this
connection handler.public int getListenPort()
public RmiConnector getRMIConnector()
public java.lang.String getShutdownListenerName()
getShutdownListenerName
in interface ServerShutdownListener
public java.lang.String getSSLServerCertNickname()
public void initializeConnectionHandler(JMXConnectionHandlerCfg config) throws ConfigException, InitializationException
initializeConnectionHandler
in class ConnectionHandler<JMXConnectionHandlerCfg>
config
- The connection handler configuration that contains the
information to use to initialize this connection
handler.
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 java.lang.String getConnectionHandlerName()
getConnectionHandlerName
in class ConnectionHandler<JMXConnectionHandlerCfg>
public java.lang.String getProtocol()
getProtocol
in class ConnectionHandler<JMXConnectionHandlerCfg>
public java.util.Collection<HostPort> getListeners()
getListeners
in class ConnectionHandler<JMXConnectionHandlerCfg>
public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration, java.util.List<Message> 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, java.util.List<Message> 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(Message reason)
processServerShutdown
in interface ServerShutdownListener
reason
- The human-readable reason for the shutdown.public void registerClientConnection(ClientConnection connection)
connection
- The client connection.public void run()
run
in interface java.lang.Runnable
run
in class ConnectionHandler<JMXConnectionHandlerCfg>
public void toString(java.lang.StringBuilder buffer)
toString
in class ConnectionHandler<JMXConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |