public class HTTPConnectionHandler extends ConnectionHandler<HttpConnectionHandlerCfg> implements ConfigurationChangeListener<HttpConnectionHandlerCfg>, AlertGenerator
Constructor and Description |
---|
HTTPConnectionHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAdditionalMeters(MeterRegistryHolder registry)
Computes additional meters that is specific to the connection handler implementation.
|
protected void |
addAdditionalMonitorObjectClassNames(Attribute ocAttr)
Adds the object class names that should be included in the monitor entry related to this connection handler to
the provided attribute.
|
ConfigChangeResult |
applyConfigurationChange(HttpConnectionHandlerCfg config)
Applies the configuration changes to this change listener.
|
void |
bind()
Operates in a loop, accepting new connections and ensuring that requests on those connections are handled
properly.
|
void |
doClose()
Closes this connection handler so that it will no longer accept new client connections.
|
void |
doInitializeConnectionHandler(ServerContext serverContext,
HttpConnectionHandlerCfg config)
Initializes this connection handler provider based on the information in the provided connection handler
configuration.
|
Map<String,String> |
getAlerts()
Retrieves information about the set of alerts that this generator may produce.
|
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 |
getConfigurationName()
Returns the name used for identifying this HTTP connection handler in the server configuration.
|
String |
getConnectionHandlerName()
Retrieves a name that may be used to refer to this connection handler.
|
String |
getConnectionHandlerType()
Returns the type of 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.
|
HealthStatus |
getHealthStatus()
Returns the Http connection handler's health status based on the listen addresses.
|
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.
|
HttpStatistics |
getStatTracker()
Returns the set of statistics maintained by this connection handler.
|
boolean |
isConfigurationAcceptable(HttpConnectionHandlerCfg config,
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.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the provided buffer.
|
close, getNumRequestHandlers, initializeConnectionHandler, setAdminConnectionHandler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClassName
public ConfigChangeResult applyConfigurationChange(HttpConnectionHandlerCfg config)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<HttpConnectionHandlerCfg>
config
- The new configuration containing the changes.public void doClose()
ConnectionHandler
doClose
in class ConnectionHandler<HttpConnectionHandlerCfg>
public Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
public Collection<ClientConnection> getClientConnections()
ConnectionHandler
getClientConnections
in class ConnectionHandler<HttpConnectionHandlerCfg>
public Dn getComponentEntryDN()
ConnectionHandler
getComponentEntryDN
in interface AlertGenerator
getComponentEntryDN
in class ConnectionHandler<HttpConnectionHandlerCfg>
public String getConnectionHandlerName()
ConnectionHandler
getConnectionHandlerName
in class ConnectionHandler<HttpConnectionHandlerCfg>
public String getConnectionHandlerType()
ConnectionHandler
ConnectionHandler.getProtocol()
.
It should be returning the insecure protocol version.getConnectionHandlerType
in class ConnectionHandler<HttpConnectionHandlerCfg>
public String getConfigurationName()
The configuration name does not contain IP addressed neither port number.
getConnectionHandlerName()
can be use to have such information amended to the configuration name.
String
representing the name used for identifying this HTTPConnectionHandler
in the
server configuration.getConnectionHandlerName()
public Collection<String> getEnabledSSLCipherSuites()
ConnectionHandler
getEnabledSSLCipherSuites
in class ConnectionHandler<HttpConnectionHandlerCfg>
public Collection<String> getEnabledSSLProtocols()
ConnectionHandler
getEnabledSSLProtocols
in class ConnectionHandler<HttpConnectionHandlerCfg>
public Collection<HostPort> getListeners()
ConnectionHandler
getListeners
in class ConnectionHandler<HttpConnectionHandlerCfg>
public String getProtocol()
ConnectionHandler
getProtocol
in class ConnectionHandler<HttpConnectionHandlerCfg>
public HttpStatistics getStatTracker()
protected void addAdditionalMeters(MeterRegistryHolder registry)
ConnectionHandler
addAdditionalMeters
in class ConnectionHandler<HttpConnectionHandlerCfg>
registry
- where additional meters should be added.protected void addAdditionalMonitorObjectClassNames(Attribute ocAttr)
ConnectionHandler
addAdditionalMonitorObjectClassNames
in class ConnectionHandler<HttpConnectionHandlerCfg>
ocAttr
- The object class attribute on which the object class names are added.public void doInitializeConnectionHandler(ServerContext serverContext, HttpConnectionHandlerCfg config) throws InitializationException
ConnectionHandler
doInitializeConnectionHandler
in class ConnectionHandler<HttpConnectionHandlerCfg>
serverContext
- The server context.config
- The connection handler configuration that contains the information to use to initialize this
connection handler.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.public boolean isConfigurationAcceptable(HttpConnectionHandlerCfg config, List<LocalizableMessage> unacceptableReasons)
ConnectionHandler
isConfigurationAcceptable
in class ConnectionHandler<HttpConnectionHandlerCfg>
config
- 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)
ConfigurationChangeListener
isConfigurationChangeAcceptable
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 void bind() throws IOException
ConnectionHandler
bind
in class ConnectionHandler<HttpConnectionHandlerCfg>
IOException
- If the ConnectionHandler
cannot be bound.public HealthStatus getHealthStatus()
getHealthStatus
in interface HealthStatusProvider
getHealthStatus
in class ConnectionHandler<HttpConnectionHandlerCfg>
public void toString(StringBuilder buffer)
ConnectionHandler
toString
in class ConnectionHandler<HttpConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.Copyright 2010-2022 ForgeRock AS.