|
|||||||||
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<T>
T
- The type of connection handler configuration handled by
this connection handler implementation.@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=true, mayInvoke=false) public abstract class ConnectionHandler<T extends ConnectionHandlerCfg>
This class defines the set of methods and structures that must be implemented by a Directory Server connection handler.
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 | |
---|---|
protected |
ConnectionHandler(java.lang.String threadName)
Creates a new instance of this connection handler. |
Method Summary | |
---|---|
abstract void |
finalizeConnectionHandler(Message finalizeReason,
boolean closeConnections)
Closes this connection handler so that it will no longer accept new client connections. |
abstract java.util.Collection<ClientConnection> |
getClientConnections()
Retrieves the set of active client connections that have been established through this connection handler. |
ConnectionHandlerMonitor |
getConnectionHandlerMonitor()
Retrieves the monitor instance for this connection handler. |
abstract java.lang.String |
getConnectionHandlerName()
Retrieves a name that may be used to refer to this connection handler. |
abstract java.util.Collection<HostPort> |
getListeners()
Retrieves information about the listener(s) that will be used to accept client connections. |
abstract java.lang.String |
getProtocol()
Retrieves the name of the protocol used to communicate with clients. |
abstract void |
initializeConnectionHandler(T 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. |
abstract void |
run()
Operates in a loop, accepting new connections and ensuring that requests on those connections are handled properly. |
void |
setConnectionHandlerMonitor(ConnectionHandlerMonitor monitor)
Sets the monitor instance for this connection handler. |
java.lang.String |
toString()
Retrieves a string representation of this connection handler. |
abstract 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.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 |
---|
protected ConnectionHandler(java.lang.String threadName)
threadName
- The name to use for this thread.Method Detail |
---|
public abstract void finalizeConnectionHandler(Message finalizeReason, boolean closeConnections)
closeConnections
flag.
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 abstract java.lang.String getConnectionHandlerName()
public abstract java.lang.String getProtocol()
public abstract java.util.Collection<HostPort> getListeners()
public abstract java.util.Collection<ClientConnection> getClientConnections()
public abstract void initializeConnectionHandler(T configuration) throws ConfigException, InitializationException
configuration
- 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, java.util.List<Message> unacceptableReasons)
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 abstract void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public final ConnectionHandlerMonitor getConnectionHandlerMonitor()
null
if none has been provided.public final void setConnectionHandlerMonitor(ConnectionHandlerMonitor monitor)
monitor
- The monitor instance for this connection
handler.public java.lang.String toString()
toString
in class java.lang.Thread
public abstract void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |