public abstract class ReferralAwareRequestHandler<T extends org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest> extends LdapRequestHandler<T>
ldapServer
Constructor and Description |
---|
ReferralAwareRequestHandler() |
Modifier and Type | Method and Description |
---|---|
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,
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) |
getLdapServer, handleMessage, isConfidentialityRequirementSatisfied, rejectWithoutConfidentiality, setLdapServer
public final void handle(LdapSession session, T req) throws 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 handleException
- If there is an error during the processing of this messagepublic static final boolean isEntryReferral(ClonedServerEntry entry) throws Exception
Exception
public static final ClonedServerEntry getFarthestReferralAncestor(LdapSession session, org.apache.directory.shared.ldap.name.DN target) throws Exception
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 Exception
referralAncestor
- the farthest referral ancestor of the missing
entryException
public org.apache.directory.shared.ldap.message.internal.InternalReferral getReferralOnAncestorForSearch(LdapSession session, org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req, ClonedServerEntry referralAncestor) throws Exception
referralAncestor
- the farthest referral ancestor of the missing
entryException
public void handleException(LdapSession session, org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest req, 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
Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.