|
|||||||||
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.protocols.ldap.LDAPRequestHandler
public class LDAPRequestHandler
This class defines an LDAP request handler, which is associated with an LDAP connection handler and is responsible for reading and decoding any requests that LDAP clients may send to the server. Multiple request handlers may be used in conjunction with a single connection handler for better performance and scalability.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
BUFFER_SIZE
The buffer size in bytes to use when reading data from a client. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LDAPRequestHandler(LDAPConnectionHandler connectionHandler,
int requestHandlerID)
Creates a new LDAP request handler that will be associated with the provided connection handler. |
Method Summary | |
---|---|
void |
deregisterAllClients()
Deregisters all clients associated with this request handler. |
void |
deregisterClient(LDAPClientConnection clientConnection)
Deregisters the provided client connection from this request handler so it will no longer look for requests from that client. |
java.util.Collection<LDAPClientConnection> |
getClientConnections()
Retrieves the set of all client connections that are currently registered with this request handler. |
java.lang.String |
getShutdownListenerName()
Retrieves the human-readable name for this shutdown listener. |
void |
processServerShutdown(Message reason)
Indicates that the Directory Server has received a request to stop running and that this shutdown listener should take any action necessary to prepare for it. |
boolean |
registerClient(LDAPClientConnection clientConnection)
Registers the provided client connection with this request handler so that any requests received from that client will be processed. |
void |
registerShutdownListener()
Causes this request handler to register itself as a shutdown listener with the Directory Server. |
void |
run()
Operates in a loop, waiting for client requests to arrive and ensuring that they are processed properly. |
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, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int BUFFER_SIZE
Constructor Detail |
---|
public LDAPRequestHandler(LDAPConnectionHandler connectionHandler, int requestHandlerID) throws InitializationException
connectionHandler
- The LDAP connection handler with which this
request handler is associated.requestHandlerID
- The integer value that may be used to distingush
this request handler from others associated with
the same connection handler.
InitializationException
- If a problem occurs while initializing
this request handler.Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean registerClient(LDAPClientConnection clientConnection)
clientConnection
- The client connection to be registered with this
request handler.
true
if the client connection was properly registered
with this request handler, or false
if not.public void deregisterClient(LDAPClientConnection clientConnection)
clientConnection
- The client connection to deregister from this
request handler.public void deregisterAllClients()
public java.util.Collection<LDAPClientConnection> getClientConnections()
public java.lang.String getShutdownListenerName()
getShutdownListenerName
in interface ServerShutdownListener
public void registerShutdownListener()
public void processServerShutdown(Message reason)
processServerShutdown
in interface ServerShutdownListener
reason
- The human-readable reason for the shutdown.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |