|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.ldap.handlers.LdapRequestHandler<T>
org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler<T>
public abstract class ReferralAwareRequestHandler<T extends org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest>
A based class for handlers which deal with SingleReplyRequests. This class provides various capabilities out of the box for these kinds of requests so common handling code is not duplicated. Namely, exception handling and referral handling code common to most SingleReplyRequests (minus ExtendedRequests) are handled thanks to this class.
Field Summary |
---|
Fields inherited from class org.apache.directory.server.ldap.handlers.LdapRequestHandler |
---|
ldapServer |
Fields inherited from interface org.apache.mina.handler.demux.MessageHandler |
---|
NOOP |
Constructor Summary | |
---|---|
ReferralAwareRequestHandler()
|
Method Summary | |
---|---|
static ClonedServerEntry |
getFarthestReferralAncestor(LdapSession session,
org.apache.directory.shared.ldap.name.DN target)
Searches up the ancestry of a DN searching for the farthest referral ancestor. |
org.apache.directory.shared.ldap.message.internal.InternalReferral |
getReferralOnAncestor(LdapSession session,
org.apache.directory.shared.ldap.name.DN reqTargetDn,
T req,
ClonedServerEntry referralAncestor)
Handles processing with referrals without ManageDsaIT control and with an ancestor that is a referral. |
org.apache.directory.shared.ldap.message.internal.InternalReferral |
getReferralOnAncestorForSearch(LdapSession session,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req,
ClonedServerEntry referralAncestor)
Handles processing with referrals without ManageDsaIT control and with an ancestor that is a referral. |
void |
handle(LdapSession session,
T req)
Handle a Ldap message associated with a session |
void |
handleException(LdapSession session,
org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest req,
java.lang.Exception e)
Handles processing with referrals without ManageDsaIT control. |
abstract void |
handleIgnoringReferrals(LdapSession session,
T req)
Handles processing without referral handling in effect: either with the ManageDsaIT control or when the entry or all of it's ancestors are non- referral entries. |
abstract void |
handleWithReferrals(LdapSession session,
org.apache.directory.shared.ldap.name.DN reqTargetDn,
T req)
Handles processing with referrals without ManageDsaIT control. |
static boolean |
isEntryReferral(ClonedServerEntry entry)
|
Methods inherited from class org.apache.directory.server.ldap.handlers.LdapRequestHandler |
---|
getLdapServer, handleMessage, isConfidentialityRequirementSatisfied, rejectWithoutConfidentiality, setLdapServer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReferralAwareRequestHandler()
Method Detail |
---|
public final void handle(LdapSession session, T req) throws java.lang.Exception
LdapRequestHandler
handle
in class LdapRequestHandler<T extends org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest>
session
- The associated sessionreq
- The message we have to handle
java.lang.Exception
- If there is an error during the processing of this messagepublic static final boolean isEntryReferral(ClonedServerEntry entry) throws java.lang.Exception
java.lang.Exception
public static final ClonedServerEntry getFarthestReferralAncestor(LdapSession session, org.apache.directory.shared.ldap.name.DN target) throws java.lang.Exception
java.lang.Exception
- if there are problems during this searchpublic org.apache.directory.shared.ldap.message.internal.InternalReferral getReferralOnAncestor(LdapSession session, org.apache.directory.shared.ldap.name.DN reqTargetDn, T req, ClonedServerEntry referralAncestor) throws java.lang.Exception
referralAncestor
- the farthest referral ancestor of the missing
entry
java.lang.Exception
public org.apache.directory.shared.ldap.message.internal.InternalReferral getReferralOnAncestorForSearch(LdapSession session, org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req, ClonedServerEntry referralAncestor) throws java.lang.Exception
referralAncestor
- the farthest referral ancestor of the missing
entry
java.lang.Exception
public void handleException(LdapSession session, org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest req, java.lang.Exception e)
handleException
in class LdapRequestHandler<T extends org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest>
public abstract void handleIgnoringReferrals(LdapSession session, T req)
session
- the LDAP session under which processing occursreqTargetDn
- the target entry DN associated with the requestentry
- the target entry if it exists and has been looked up, may
be null even if the entry exists, offered in case the entry is looked
up to avoid repeat lookups. Implementations should check if the entry
is null and attempt a lookup instead of presuming the entry does not
exist.req
- the request to be handledpublic abstract void handleWithReferrals(LdapSession session, org.apache.directory.shared.ldap.name.DN reqTargetDn, T req) throws org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |