public class HTTPConnectionHandler extends ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg> implements Runnable, org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>, ServerShutdownListener, AlertGenerator
Constructor and Description |
---|
HTTPConnectionHandler() |
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg config) |
void |
bind()
Operates in a loop, accepting new connections and ensuring that requests on those connections are handled
properly.
|
void |
close()
Closes this connection handler so that it will no longer accept new client connections.
|
Map<String,String> |
getAlerts()
Retrieves information about the set of alerts that this generator
may produce.
|
String |
getClassName()
Retrieves the fully-qualified name of the Java class for this
alert generator implementation.
|
Collection<ClientConnection> |
getClientConnections()
Retrieves the set of active client connections that have been established through this connection handler.
|
org.forgerock.opendj.ldap.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.
|
Collection<String> |
getEnabledSSLCipherSuites()
Retrieves an unmodifiable set of enabled SSL cipher suites configured for this connection handler, if applicable.
|
Collection<String> |
getEnabledSSLProtocols()
Retrieves the set of enabled SSL protocols configured for this connection handler.
|
Collection<HostPort> |
getListeners()
Retrieves information about the listener(s) that will be used to accept client connections.
|
String |
getProtocol()
Retrieves the name of the protocol used to communicate with clients.
|
String |
getShutdownListenerName()
Retrieves the human-readable name for this shutdown listener.
|
HTTPStatistics |
getStatTracker()
Retrieves the set of statistics maintained by this connection handler.
|
void |
initializeConnectionHandler(ServerContext serverContext,
org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg config)
Initializes this connection handler provider based on the information in the provided connection handler
configuration.
|
boolean |
isConfigurationAcceptable(org.forgerock.opendj.server.config.server.ConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this connection handler.
|
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons) |
boolean |
keepStats()
Indicates whether this connection handler should maintain usage statistics.
|
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 |
run() |
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the provided buffer.
|
getConnectionHandlerMonitor, getNumRequestHandlers, isAdminConnectionHandler, setAdminConnectionHandler, setConnectionHandlerMonitor, toString
public HTTPConnectionHandler()
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg config)
applyConfigurationChange
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public void close()
ConnectionHandler
close
in interface Closeable
close
in interface AutoCloseable
close
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
public String getClassName()
AlertGenerator
getClassName
in interface AlertGenerator
public Collection<ClientConnection> getClientConnections()
ConnectionHandler
getClientConnections
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public org.forgerock.opendj.ldap.Dn getComponentEntryDN()
ConnectionHandler
getComponentEntryDN
in interface AlertGenerator
getComponentEntryDN
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public String getConnectionHandlerName()
ConnectionHandler
getConnectionHandlerName
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public Collection<String> getEnabledSSLCipherSuites()
ConnectionHandler
getEnabledSSLCipherSuites
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public Collection<String> getEnabledSSLProtocols()
ConnectionHandler
getEnabledSSLProtocols
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public Collection<HostPort> getListeners()
ConnectionHandler
getListeners
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public String getProtocol()
ConnectionHandler
getProtocol
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public String getShutdownListenerName()
ServerShutdownListener
getShutdownListenerName
in interface ServerShutdownListener
public HTTPStatistics getStatTracker()
public void initializeConnectionHandler(ServerContext serverContext, org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg config) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
ConnectionHandler
initializeConnectionHandler
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
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 boolean isConfigurationAcceptable(org.forgerock.opendj.server.config.server.ConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConnectionHandler
isConfigurationAcceptable
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
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(org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
public boolean keepStats()
true
if this connection handler should maintain usage statistics, or false
if
not.public void processServerShutdown(LocalizableMessage reason)
ServerShutdownListener
processServerShutdown
in interface ServerShutdownListener
reason
- The human-readable reason for the shutdown.public void bind() throws IOException
ConnectionHandler
bind
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
IOException
- If the ConnectionHandler
cannot be bound.public void toString(StringBuilder buffer)
ConnectionHandler
toString
in class ConnectionHandler<org.forgerock.opendj.server.config.server.HttpConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.