Package org.ldaptive
Class AbstractSearchOperationFactory
- java.lang.Object
-
- org.ldaptive.AbstractSearchOperationFactory
-
- All Implemented Interfaces:
ConnectionFactoryManager
- Direct Known Subclasses:
AbstractSearchEntryResolver
,PagedResultsClient
,SearchDnResolver
,SearchRoleResolver
,VirtualListViewClient
public abstract class AbstractSearchOperationFactory extends Object implements ConnectionFactoryManager
Base class for classes that perform searches.
-
-
Field Summary
Fields Modifier and Type Field Description private ResponseControlHandler[]
controlHandlers
Functions to handle response controls.private LdapEntryHandler[]
entryHandlers
Functions to handle entries.private ExceptionHandler
exceptionHandler
Function to handle exceptions.private ConnectionFactory
factory
Connection factory.private IntermediateResponseHandler[]
intermediateResponseHandlers
Functions to handle intermediate responses.protected Logger
logger
Logger for this class.private SearchReferenceHandler[]
referenceHandlers
Functions to handle response references.private ReferralHandler[]
referralHandlers
Functions to handle referrals.private RequestHandler<SearchRequest>[]
requestHandlers
Functions to handle requests.private ResultHandler[]
resultHandlers
Functions to handle response results.private SearchResultHandler[]
searchResultHandlers
Functions to handle search response results.private ResultPredicate
throwCondition
Function to test results.private UnsolicitedNotificationHandler[]
unsolicitedNotificationHandlers
Functions to handle unsolicited notifications.
-
Constructor Summary
Constructors Constructor Description AbstractSearchOperationFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SearchOperation
createSearchOperation()
Creates a new search operation configured with the properties on this factory.protected SearchOperation
createSearchOperation(ConnectionFactory cf)
Creates a new search operation configured with the properties on this factory.ConnectionFactory
getConnectionFactory()
Returns the connection factory.ResponseControlHandler[]
getControlHandlers()
Returns the control handlers.LdapEntryHandler[]
getEntryHandlers()
Returns the search entry handlers.ExceptionHandler
getExceptionHandler()
Returns the search exception handler.IntermediateResponseHandler[]
getIntermediateResponseHandlers()
Returns the intermediate response handlers.SearchReferenceHandler[]
getReferenceHandlers()
Returns the search reference handlers.ReferralHandler[]
getReferralHandlers()
Returns the referral handlers.RequestHandler<SearchRequest>[]
getRequestHandlers()
Returns the search request handlers.ResultHandler[]
getResultHandlers()
Returns the search result handlers.SearchResultHandler[]
getSearchResultHandlers()
Returns the search result handlers.ResultPredicate
getThrowCondition()
Returns the throw condition.UnsolicitedNotificationHandler[]
getUnsolicitedNotificationHandlers()
Returns the unsolicited notification handlers.void
setConnectionFactory(ConnectionFactory cf)
Sets the connection factory.void
setControlHandlers(ResponseControlHandler... handlers)
Sets the control handlers.void
setEntryHandlers(LdapEntryHandler... handlers)
Sets the search entry handlers.void
setExceptionHandler(ExceptionHandler handler)
Sets the search exception handler.void
setIntermediateResponseHandlers(IntermediateResponseHandler... handlers)
Sets the intermediate response handlers.void
setReferenceHandlers(SearchReferenceHandler... handlers)
Sets the search reference handlers.void
setReferralHandlers(ReferralHandler... handlers)
Sets the referral handlers.void
setRequestHandlers(RequestHandler<SearchRequest>... handlers)
Sets the search request handlers.void
setResultHandlers(ResultHandler... handlers)
Sets the search result handlers.void
setSearchResultHandlers(SearchResultHandler... handlers)
Sets the search result handlers.void
setThrowCondition(ResultPredicate function)
Sets the throw condition.void
setUnsolicitedNotificationHandlers(UnsolicitedNotificationHandler... handlers)
Sets the unsolicited notification handlers.
-
-
-
Field Detail
-
logger
protected final Logger logger
Logger for this class.
-
factory
private ConnectionFactory factory
Connection factory.
-
requestHandlers
private RequestHandler<SearchRequest>[] requestHandlers
Functions to handle requests.
-
resultHandlers
private ResultHandler[] resultHandlers
Functions to handle response results.
-
controlHandlers
private ResponseControlHandler[] controlHandlers
Functions to handle response controls.
-
referralHandlers
private ReferralHandler[] referralHandlers
Functions to handle referrals.
-
intermediateResponseHandlers
private IntermediateResponseHandler[] intermediateResponseHandlers
Functions to handle intermediate responses.
-
exceptionHandler
private ExceptionHandler exceptionHandler
Function to handle exceptions.
-
throwCondition
private ResultPredicate throwCondition
Function to test results.
-
unsolicitedNotificationHandlers
private UnsolicitedNotificationHandler[] unsolicitedNotificationHandlers
Functions to handle unsolicited notifications.
-
entryHandlers
private LdapEntryHandler[] entryHandlers
Functions to handle entries.
-
referenceHandlers
private SearchReferenceHandler[] referenceHandlers
Functions to handle response references.
-
searchResultHandlers
private SearchResultHandler[] searchResultHandlers
Functions to handle search response results.
-
-
Method Detail
-
getConnectionFactory
public ConnectionFactory getConnectionFactory()
Returns the connection factory.- Specified by:
getConnectionFactory
in interfaceConnectionFactoryManager
- Returns:
- connection factory
-
setConnectionFactory
public void setConnectionFactory(ConnectionFactory cf)
Sets the connection factory.- Specified by:
setConnectionFactory
in interfaceConnectionFactoryManager
- Parameters:
cf
- connection factory
-
getRequestHandlers
public RequestHandler<SearchRequest>[] getRequestHandlers()
Returns the search request handlers.- Returns:
- search request handlers
-
setRequestHandlers
public void setRequestHandlers(RequestHandler<SearchRequest>... handlers)
Sets the search request handlers.- Parameters:
handlers
- search request handler
-
getResultHandlers
public ResultHandler[] getResultHandlers()
Returns the search result handlers.- Returns:
- search result handlers
-
setResultHandlers
public void setResultHandlers(ResultHandler... handlers)
Sets the search result handlers.- Parameters:
handlers
- search result handlers
-
getControlHandlers
public ResponseControlHandler[] getControlHandlers()
Returns the control handlers.- Returns:
- control handlers
-
setControlHandlers
public void setControlHandlers(ResponseControlHandler... handlers)
Sets the control handlers.- Parameters:
handlers
- control handlers
-
getReferralHandlers
public ReferralHandler[] getReferralHandlers()
Returns the referral handlers.- Returns:
- referral handlers
-
setReferralHandlers
public void setReferralHandlers(ReferralHandler... handlers)
Sets the referral handlers.- Parameters:
handlers
- referral handlers
-
getIntermediateResponseHandlers
public IntermediateResponseHandler[] getIntermediateResponseHandlers()
Returns the intermediate response handlers.- Returns:
- intermediate response handlers
-
setIntermediateResponseHandlers
public void setIntermediateResponseHandlers(IntermediateResponseHandler... handlers)
Sets the intermediate response handlers.- Parameters:
handlers
- intermediate response handlers
-
getExceptionHandler
public ExceptionHandler getExceptionHandler()
Returns the search exception handler.- Returns:
- search exception handler
-
setExceptionHandler
public void setExceptionHandler(ExceptionHandler handler)
Sets the search exception handler.- Parameters:
handler
- search exception handler
-
getThrowCondition
public ResultPredicate getThrowCondition()
Returns the throw condition.- Returns:
- throw condition
-
setThrowCondition
public void setThrowCondition(ResultPredicate function)
Sets the throw condition.- Parameters:
function
- throw condition
-
getUnsolicitedNotificationHandlers
public UnsolicitedNotificationHandler[] getUnsolicitedNotificationHandlers()
Returns the unsolicited notification handlers.- Returns:
- unsolicited notification handlers
-
setUnsolicitedNotificationHandlers
public void setUnsolicitedNotificationHandlers(UnsolicitedNotificationHandler... handlers)
Sets the unsolicited notification handlers.- Parameters:
handlers
- unsolicited notification handlers
-
getEntryHandlers
public LdapEntryHandler[] getEntryHandlers()
Returns the search entry handlers.- Returns:
- search entry handlers
-
setEntryHandlers
public void setEntryHandlers(LdapEntryHandler... handlers)
Sets the search entry handlers.- Parameters:
handlers
- search entry handlers
-
getReferenceHandlers
public SearchReferenceHandler[] getReferenceHandlers()
Returns the search reference handlers.- Returns:
- search reference handlers
-
setReferenceHandlers
public void setReferenceHandlers(SearchReferenceHandler... handlers)
Sets the search reference handlers.- Parameters:
handlers
- search reference handlers
-
getSearchResultHandlers
public SearchResultHandler[] getSearchResultHandlers()
Returns the search result handlers.- Returns:
- search result handlers
-
setSearchResultHandlers
public void setSearchResultHandlers(SearchResultHandler... handlers)
Sets the search result handlers.- Parameters:
handlers
- search result handlers
-
createSearchOperation
protected SearchOperation createSearchOperation()
Creates a new search operation configured with the properties on this factory.- Returns:
- search operation
-
createSearchOperation
protected SearchOperation createSearchOperation(ConnectionFactory cf)
Creates a new search operation configured with the properties on this factory.- Parameters:
cf
- connection factory to set on the search operation- Returns:
- search operation
-
-