|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.opends.server.api.DirectoryThread
org.opends.server.api.ConnectionHandler<LDIFConnectionHandlerCfg>
org.opends.server.protocols.LDIFConnectionHandler
public final class LDIFConnectionHandler
This class defines an LDIF connection handler, which can be used to watch for new LDIF files to be placed in a specified directory. If a new LDIF file is detected, the connection handler will process any changes contained in that file as internal operations.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LDIFConnectionHandler()
Creates a new instance of this connection handler. |
Method Summary | |
---|---|
ConfigChangeResult |
applyConfigurationChange(LDIFConnectionHandlerCfg configuration)
Applies the configuration changes to this change listener. |
void |
finalizeConnectionHandler(Message finalizeReason,
boolean closeConnections)
Closes this connection handler so that it will no longer accept new client connections. |
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getAlerts()
Retrieves information about the set of alerts that this generator may produce. |
java.lang.String |
getClassName()
Retrieves the fully-qualified name of the Java class for this alert generator implementation. |
java.util.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. |
java.lang.String |
getConnectionHandlerName()
Retrieves a name that may be used to refer to this connection handler. |
java.util.Collection<HostPort> |
getListeners()
Retrieves information about the listener(s) that will be used to accept client connections. |
java.lang.String |
getProtocol()
Retrieves the name of the protocol used to communicate with clients. |
void |
initializeConnectionHandler(LDIFConnectionHandlerCfg configuration)
Initializes this connection handler provider based on the information in the provided connection handler configuration. |
boolean |
isConfigurationAcceptable(ConnectionHandlerCfg configuration,
java.util.List<Message> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this connection handler. |
boolean |
isConfigurationChangeAcceptable(LDIFConnectionHandlerCfg configuration,
java.util.List<Message> 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(java.lang.StringBuilder buffer)
Appends a string representation of this connection handler to the provided buffer. |
Methods inherited from class org.opends.server.api.ConnectionHandler |
---|
getConnectionHandlerMonitor, setConnectionHandlerMonitor, toString |
Methods inherited from class org.opends.server.api.DirectoryThread |
---|
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LDIFConnectionHandler()
initializeConnectionHandler
method.
Method Detail |
---|
public void initializeConnectionHandler(LDIFConnectionHandlerCfg configuration)
initializeConnectionHandler
in class ConnectionHandler<LDIFConnectionHandlerCfg>
configuration
- The connection handler configuration that contains the
information to use to initialize this connection
handler.public void finalizeConnectionHandler(Message finalizeReason, boolean closeConnections)
closeConnections
flag.
finalizeConnectionHandler
in class ConnectionHandler<LDIFConnectionHandlerCfg>
finalizeReason
- The reason that this connection handler should be
finalized.closeConnections
- Indicates whether any established client connections
associated with the connection handler should also be
closed.public java.lang.String getConnectionHandlerName()
getConnectionHandlerName
in class ConnectionHandler<LDIFConnectionHandlerCfg>
public java.lang.String getProtocol()
getProtocol
in class ConnectionHandler<LDIFConnectionHandlerCfg>
public java.util.Collection<HostPort> getListeners()
getListeners
in class ConnectionHandler<LDIFConnectionHandlerCfg>
public java.util.Collection<ClientConnection> getClientConnections()
getClientConnections
in class ConnectionHandler<LDIFConnectionHandlerCfg>
public void run()
run
in interface java.lang.Runnable
run
in class ConnectionHandler<LDIFConnectionHandlerCfg>
public void toString(java.lang.StringBuilder buffer)
toString
in class ConnectionHandler<LDIFConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration, java.util.List<Message> unacceptableReasons)
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, java.util.List<Message> unacceptableReasons)
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)
applyConfigurationChange
in interface ConfigurationChangeListener<LDIFConnectionHandlerCfg>
configuration
- The new configuration containing the changes.
public DN getComponentEntryDN()
getComponentEntryDN
in interface AlertGenerator
public java.lang.String getClassName()
getClassName
in interface AlertGenerator
public java.util.LinkedHashMap<java.lang.String,java.lang.String> getAlerts()
getAlerts
in interface AlertGenerator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |