org.apache.directory.server.ldap.handlers
Class SearchHandler
java.lang.Object
org.apache.directory.server.ldap.handlers.LdapRequestHandler<T>
org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest>
org.apache.directory.server.ldap.handlers.SearchHandler
- All Implemented Interfaces:
- org.apache.mina.handler.demux.MessageHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest>
public class SearchHandler
- extends ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest>
A handler for processing search requests.
- Version:
- $Rev: 664302 $
- Author:
- Apache Directory Project
Fields inherited from interface org.apache.mina.handler.demux.MessageHandler |
NOOP |
Method Summary |
void |
handleIgnoringReferrals(LdapSession session,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req)
Main message handing method for search requests. |
void |
handleWithReferrals(LdapSession session,
org.apache.directory.shared.ldap.name.DN reqTargetDn,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req)
Handles processing with referrals without ManageDsaIT control. |
void |
modifyFilter(LdapSession session,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req)
Alters the filter expression based on the presence of the
ManageDsaIT control. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchHandler
public SearchHandler()
modifyFilter
public void modifyFilter(LdapSession session,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req)
throws java.lang.Exception
- Alters the filter expression based on the presence of the
ManageDsaIT control. If the control is not present, the search
filter will be altered to become a disjunction with two terms.
The first term is the original filter. The second term is a
(objectClass=referral) assertion. When OR'd together these will
make sure we get all referrals so we can process continuations
properly without having the filter remove them from the result
set.
NOTE: original filter is first since most entries are not referrals
so it has a higher probability on average of accepting and shorting
evaluation before having to waste cycles trying to evaluate if the
entry is a referral.
- Parameters:
session
- the session to use to construct the filter (schema access)req
- the request to get the original filter from
- Throws:
java.lang.Exception
- if there are schema access problems
handleIgnoringReferrals
public void handleIgnoringReferrals(LdapSession session,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req)
- Main message handing method for search requests. This will be called
even if the ManageDsaIT control is present because the super class does
not know that the search operation has more to do after finding the
base. The call to this means that finding the base can ignore
referrals.
- Specified by:
handleIgnoringReferrals
in class ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest>
- Parameters:
session
- the associated sessionreq
- the received SearchRequest
handleWithReferrals
public void handleWithReferrals(LdapSession session,
org.apache.directory.shared.ldap.name.DN reqTargetDn,
org.apache.directory.shared.ldap.message.internal.InternalSearchRequest req)
throws org.apache.directory.shared.ldap.exception.LdapException
- Handles processing with referrals without ManageDsaIT control.
- Specified by:
handleWithReferrals
in class ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest>
- Throws:
org.apache.directory.shared.ldap.exception.LdapException
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.