org.apache.directory.server.ldap.handlers
Class LdapResponseHandler<T extends org.apache.directory.api.ldap.model.message.Response>

java.lang.Object
  extended by org.apache.directory.server.ldap.handlers.LdapResponseHandler<T>
All Implemented Interfaces:
org.apache.mina.handler.demux.MessageHandler<T>
Direct Known Subclasses:
AddResponseHandler, BindResponseHandler, CompareResponseHandler, DeleteResponseHandler, ExtendedResponseHandler, IntermediateResponseHandler, ModifyDnResponseHandler, ModifyResponseHandler, SearchResultDoneHandler, SearchResultEntryHandler, SearchResultReferenceHandler

public abstract class LdapResponseHandler<T extends org.apache.directory.api.ldap.model.message.Response>
extends Object
implements org.apache.mina.handler.demux.MessageHandler<T>

A base class for all LDAP response handlers.

Author:
Apache Directory Project

Field Summary
protected  LdapServer ldapServer
          The reference on the Ldap server instance
protected static org.slf4j.Logger LOG
          The logger for this class
 
Fields inherited from interface org.apache.mina.handler.demux.MessageHandler
NOOP
 
Constructor Summary
LdapResponseHandler()
           
 
Method Summary
 LdapServer getLdapServer()
           
abstract  void handle(LdapSession session, T message)
          Handle a Ldap message associated with a session
 void handleMessage(org.apache.mina.core.session.IoSession session, T message)
          
 void setLdapServer(LdapServer ldapServer)
          Associates a Ldap server instance to the message handler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
The logger for this class


ldapServer

protected LdapServer ldapServer
The reference on the Ldap server instance

Constructor Detail

LdapResponseHandler

public LdapResponseHandler()
Method Detail

getLdapServer

public final LdapServer getLdapServer()
Returns:
The associated ldap server instance

setLdapServer

public final void setLdapServer(LdapServer ldapServer)
Associates a Ldap server instance to the message handler

Parameters:
ldapServer - the associated ldap server instance

handleMessage

public final void handleMessage(org.apache.mina.core.session.IoSession session,
                                T message)
                         throws Exception

Specified by:
handleMessage in interface org.apache.mina.handler.demux.MessageHandler<T extends org.apache.directory.api.ldap.model.message.Response>
Throws:
Exception

handle

public abstract void handle(LdapSession session,
                            T message)
                     throws Exception
Handle a Ldap message associated with a session

Parameters:
session - The associated session
message - The message we have to handle
Throws:
Exception - If there is an error during the processing of this message


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.