public class HTTPConnectionHandler extends ConnectionHandler<HTTPConnectionHandlerCfg> implements ConfigurationChangeListener<HTTPConnectionHandlerCfg>, ServerShutdownListener, AlertGenerator
DirectoryThread.FactoryThread.State, Thread.UncaughtExceptionHandlerDIRECTORY_THREAD_GROUPMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
HTTPConnectionHandler()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptUnauthenticatedRequests()
Returns whether unauthenticated HTTP requests are allowed.
|
ConfigChangeResult |
applyConfigurationChange(HTTPConnectionHandlerCfg 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.
|
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.
|
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(HTTPConnectionHandlerCfg 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(HTTPConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is
acceptable to this change listener.
|
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()
Operates in a loop, accepting new connections and ensuring that
requests on those connections are handled properly.
|
void |
start() |
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the
provided buffer.
|
getConnectionHandlerMonitor, getNumRequestHandlers, isAdminConnectionHandler, setAdminConnectionHandler, setConnectionHandlerMonitor, toStringgetAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, initiateShutdown, isShutdownInitiated, setAssociatedTask, startWork, stopWorkactiveCount, 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, stop, stop, suspend, yieldpublic HTTPConnectionHandler()
ConnectionHandler.public boolean acceptUnauthenticatedRequests()
public ConfigChangeResult applyConfigurationChange(HTTPConnectionHandlerCfg config)
ConfigurationChangeListenerapplyConfigurationChange in interface ConfigurationChangeListener<HTTPConnectionHandlerCfg>config - The new configuration containing the changes.public void finalizeConnectionHandler(LocalizableMessage finalizeReason)
ConnectionHandlerfinalizeConnectionHandler in class ConnectionHandler<HTTPConnectionHandlerCfg>finalizeReason - The reason that this connection handler should be
finalized.public Map<String,String> getAlerts()
AlertGeneratorgetAlerts in interface AlertGeneratorpublic String getClassName()
AlertGeneratorgetClassName in interface AlertGeneratorpublic Collection<ClientConnection> getClientConnections()
ConnectionHandlergetClientConnections in class ConnectionHandler<HTTPConnectionHandlerCfg>public DN getComponentEntryDN()
ConnectionHandlergetComponentEntryDN in interface AlertGeneratorgetComponentEntryDN in class ConnectionHandler<HTTPConnectionHandlerCfg>public String getConnectionHandlerName()
ConnectionHandlergetConnectionHandlerName in class ConnectionHandler<HTTPConnectionHandlerCfg>public Collection<String> getEnabledSSLCipherSuites()
ConnectionHandlergetEnabledSSLCipherSuites in class ConnectionHandler<HTTPConnectionHandlerCfg>public Collection<String> getEnabledSSLProtocols()
ConnectionHandlergetEnabledSSLProtocols in class ConnectionHandler<HTTPConnectionHandlerCfg>public Collection<HostPort> getListeners()
ConnectionHandlergetListeners in class ConnectionHandler<HTTPConnectionHandlerCfg>public String getProtocol()
ConnectionHandlergetProtocol in class ConnectionHandler<HTTPConnectionHandlerCfg>public String getShutdownListenerName()
ServerShutdownListenergetShutdownListenerName in interface ServerShutdownListenerpublic HTTPStatistics getStatTracker()
public void initializeConnectionHandler(HTTPConnectionHandlerCfg config) throws ConfigException, InitializationException
ConnectionHandlerinitializeConnectionHandler in class ConnectionHandler<HTTPConnectionHandlerCfg>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 boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConnectionHandlerisConfigurationAcceptable in class ConnectionHandler<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(HTTPConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListenerisConfigurationChangeAcceptable in interface ConfigurationChangeListener<HTTPConnectionHandlerCfg>configuration - 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 keepStats()
true if this connection handler should maintain usage
statistics, or false if not.public void processServerShutdown(LocalizableMessage reason)
ServerShutdownListenerprocessServerShutdown in interface ServerShutdownListenerreason - The human-readable reason for the shutdown.public void run()
ConnectionHandlerrun in interface Runnablerun in class ConnectionHandler<HTTPConnectionHandlerCfg>public void toString(StringBuilder buffer)
ConnectionHandlertoString in class ConnectionHandler<HTTPConnectionHandlerCfg>buffer - The buffer to which the information should be appended.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.