public final class LDIFConnectionHandler extends ConnectionHandler<LDIFConnectionHandlerCfg> implements ConfigurationChangeListener<LDIFConnectionHandlerCfg>, AlertGenerator
DirectoryThread.Factory
Thread.State, Thread.UncaughtExceptionHandler
DIRECTORY_THREAD_GROUP
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
LDIFConnectionHandler()
Creates a new instance of this connection handler.
|
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(LDIFConnectionHandlerCfg configuration)
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.
|
LinkedHashMap<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<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.
|
void |
initializeConnectionHandler(ServerContext serverContext,
LDIFConnectionHandlerCfg configuration)
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(LDIFConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
void |
run()
Operates in a loop, accepting new connections and ensuring that
requests on those connections are handled properly.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the
provided buffer.
|
getConnectionHandlerMonitor, getEnabledSSLCipherSuites, getEnabledSSLProtocols, getNumRequestHandlers, isAdminConnectionHandler, setAdminConnectionHandler, setConnectionHandlerMonitor, toString
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, initiateShutdown, isShutdownInitiated, setAssociatedTask, startWork, stopWork
activeCount, 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, start, stop, stop, suspend, yield
public LDIFConnectionHandler()
initializeConnectionHandler
method.public void initializeConnectionHandler(ServerContext serverContext, LDIFConnectionHandlerCfg configuration)
ConnectionHandler
initializeConnectionHandler
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 finalizeConnectionHandler(LocalizableMessage finalizeReason)
ConnectionHandler
finalizeConnectionHandler
in class ConnectionHandler<LDIFConnectionHandlerCfg>
finalizeReason
- The reason that this connection handler should be
finalized.public String getConnectionHandlerName()
ConnectionHandler
getConnectionHandlerName
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 run()
ConnectionHandler
run
in interface Runnable
run
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(ConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConnectionHandler
isConfigurationAcceptable
in class ConnectionHandler<LDIFConnectionHandlerCfg>
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(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 DN getComponentEntryDN()
ConnectionHandler
getComponentEntryDN
in interface AlertGenerator
getComponentEntryDN
in class ConnectionHandler<LDIFConnectionHandlerCfg>
public String getClassName()
AlertGenerator
getClassName
in interface AlertGenerator
public LinkedHashMap<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
Copyright 2010-2017 ForgeRock AS.