public final class LDIFConnectionHandler extends ConnectionHandler<LdifConnectionHandlerCfg> implements Runnable, ConfigurationChangeListener<LdifConnectionHandlerCfg>, AlertGenerator
Constructor and Description |
---|
LDIFConnectionHandler() |
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(LdifConnectionHandlerCfg configuration)
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,
LdifConnectionHandlerCfg configuration)
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 |
getConnectionHandlerName()
Retrieves a name that may be used to refer to this connection handler.
|
String |
getConnectionHandlerType()
Returns the type of 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.
|
boolean |
isConfigurationAcceptable(LdifConnectionHandlerCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this connection handler.
|
boolean |
isConfigurationChangeAcceptable(LdifConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
void |
run() |
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the provided buffer.
|
addAdditionalMeters, addAdditionalMonitorObjectClassNames, close, getEnabledSSLCipherSuites, getEnabledSSLProtocols, getHealthStatus, getNumRequestHandlers, initializeConnectionHandler, setAdminConnectionHandler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClassName
public void doInitializeConnectionHandler(ServerContext serverContext, LdifConnectionHandlerCfg configuration)
ConnectionHandler
doInitializeConnectionHandler
in class ConnectionHandler<LdifConnectionHandlerCfg>
serverContext
- The server context.configuration
- The connection handler configuration that contains the information to use to initialize this
connection handler.public void bind() throws IOException
ConnectionHandler
bind
in class ConnectionHandler<LdifConnectionHandlerCfg>
IOException
- If the ConnectionHandler
cannot be bound.public void doClose()
ConnectionHandler
doClose
in class ConnectionHandler<LdifConnectionHandlerCfg>
public Dn getComponentEntryDN()
ConnectionHandler
getComponentEntryDN
in interface AlertGenerator
getComponentEntryDN
in class ConnectionHandler<LdifConnectionHandlerCfg>
public String getConnectionHandlerName()
ConnectionHandler
getConnectionHandlerName
in class ConnectionHandler<LdifConnectionHandlerCfg>
public String getConnectionHandlerType()
ConnectionHandler
ConnectionHandler.getProtocol()
.
It should be returning the insecure protocol version.getConnectionHandlerType
in class ConnectionHandler<LdifConnectionHandlerCfg>
public String getProtocol()
ConnectionHandler
getProtocol
in class ConnectionHandler<LdifConnectionHandlerCfg>
public Collection<HostPort> getListeners()
ConnectionHandler
getListeners
in class ConnectionHandler<LdifConnectionHandlerCfg>
public Collection<ClientConnection> getClientConnections()
ConnectionHandler
getClientConnections
in class ConnectionHandler<LdifConnectionHandlerCfg>
public void toString(StringBuilder buffer)
ConnectionHandler
toString
in class ConnectionHandler<LdifConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.public boolean isConfigurationAcceptable(LdifConnectionHandlerCfg config, List<LocalizableMessage> unacceptableReasons)
ConnectionHandler
isConfigurationAcceptable
in class ConnectionHandler<LdifConnectionHandlerCfg>
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(LdifConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<LdifConnectionHandlerCfg>
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 ConfigChangeResult applyConfigurationChange(LdifConnectionHandlerCfg configuration)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<LdifConnectionHandlerCfg>
configuration
- The new configuration containing the changes.public Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
Copyright 2010-2022 ForgeRock AS.