Package org.ldaptive.referral
Class AbstractFollowSearchReferralHandler
- java.lang.Object
-
- org.ldaptive.AbstractFreezable
-
- org.ldaptive.transport.MessageFunctional<Q,S>
-
- org.ldaptive.transport.MessageFunctional.Function<Q,S,S,S>
-
- org.ldaptive.referral.AbstractFollowReferralHandler<SearchRequest,SearchResponse>
-
- org.ldaptive.referral.AbstractFollowSearchReferralHandler
-
- All Implemented Interfaces:
Function<SearchResponse,SearchResponse>
,Freezable
- Direct Known Subclasses:
FollowSearchReferralHandler
,FollowSearchResultReferenceHandler
public abstract class AbstractFollowSearchReferralHandler extends AbstractFollowReferralHandler<SearchRequest,SearchResponse>
Base class with functionality for handling an ldap referral for search operations.
-
-
Field Summary
-
Fields inherited from class org.ldaptive.referral.AbstractFollowReferralHandler
DEFAULT_REFERRAL_LIMIT, logger, referralDepth, referralLimit
-
-
Constructor Summary
Constructors Constructor Description AbstractFollowSearchReferralHandler(int limit, int depth, ReferralConnectionFactory factory, boolean tf)
Creates a new abstract follow search referral handler.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract SearchResultHandler[]
createNextSearchResultHandler()
Creates the next search result handler for chasing referrals, which increments the referral depth.protected SearchOperation
createReferralOperation(ConnectionFactory factory)
Creates an operation for this type of referral.protected SearchRequest
createReferralRequest(LdapURL url)
Creates a new request for this type of referral.-
Methods inherited from class org.ldaptive.referral.AbstractFollowReferralHandler
apply, followReferral, getReferralConnectionFactory, getReferralDepth, getReferralLimit, getSuccessResultCodes, getThrowOnFailure
-
Methods inherited from class org.ldaptive.transport.MessageFunctional
getConnection, getHandle, getRequest, newInstance, setConnection, setHandle, setRequest
-
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
-
-
-
Constructor Detail
-
AbstractFollowSearchReferralHandler
public AbstractFollowSearchReferralHandler(int limit, int depth, ReferralConnectionFactory factory, boolean tf)
Creates a new abstract follow search referral handler.- Parameters:
limit
- number of referrals to followdepth
- number of referrals followedfactory
- referral connection factorytf
- whether to throw on failure to chase referrals
-
-
Method Detail
-
createReferralRequest
protected SearchRequest createReferralRequest(LdapURL url)
Description copied from class:AbstractFollowReferralHandler
Creates a new request for this type of referral.- Specified by:
createReferralRequest
in classAbstractFollowReferralHandler<SearchRequest,SearchResponse>
- Parameters:
url
- of the referral- Returns:
- new request
-
createReferralOperation
protected SearchOperation createReferralOperation(ConnectionFactory factory)
Description copied from class:AbstractFollowReferralHandler
Creates an operation for this type of referral.- Specified by:
createReferralOperation
in classAbstractFollowReferralHandler<SearchRequest,SearchResponse>
- Parameters:
factory
- to get a connection with- Returns:
- new operation
-
createNextSearchResultHandler
protected abstract SearchResultHandler[] createNextSearchResultHandler()
Creates the next search result handler for chasing referrals, which increments the referral depth.- Returns:
- search result handler
-
-