public class SearchExecutor extends SearchRequest
SearchOperation
. This is a
convenience class for searching if you don't need to manage individual connections. In addition, this class provides
a way to hold common search request properties constant while changing properties that tend to be more dynamic.Modifier and Type | Field and Description |
---|---|
private Cache<SearchRequest> |
searchCache
Cache to use when performing searches.
|
private OperationExceptionHandler<SearchRequest,SearchResult> |
searchExceptionHandler
Handler to handle search exceptions.
|
private OperationResponseHandler<SearchRequest,SearchResult>[] |
searchResponseHandlers
Handlers to handle search responses.
|
Constructor and Description |
---|
SearchExecutor() |
Modifier and Type | Method and Description |
---|---|
Cache<SearchRequest> |
getSearchCache()
Returns the search cache.
|
OperationExceptionHandler<SearchRequest,SearchResult> |
getSearchExceptionHandler()
Returns the search exception handler.
|
OperationResponseHandler<SearchRequest,SearchResult>[] |
getSearchResponseHandlers()
Returns the search response handlers.
|
Response<SearchResult> |
search(ConnectionFactory factory)
Performs a search operation with the supplied connection factory.
|
Response<SearchResult> |
search(ConnectionFactory factory,
SearchFilter filter)
Performs a search operation with the supplied connection factory.
|
Response<SearchResult> |
search(ConnectionFactory factory,
SearchFilter filter,
String... attrs)
Performs a search operation with the supplied connection factory.
|
Response<SearchResult> |
search(ConnectionFactory factory,
SearchFilter filter,
String[] attrs,
SearchEntryHandler... handlers)
Performs a search operation with the supplied connection factory.
|
Response<SearchResult> |
search(ConnectionFactory factory,
String filter)
Performs a search operation with the supplied connection factory.
|
Response<SearchResult> |
search(ConnectionFactory factory,
String filter,
String... attrs)
Performs a search operation with the supplied connection factory.
|
void |
setSearchCache(Cache<SearchRequest> cache)
Sets the search cache.
|
void |
setSearchExceptionHandler(OperationExceptionHandler<SearchRequest,SearchResult> handler)
Sets the search exception handler.
|
void |
setSearchResponseHandlers(OperationResponseHandler<SearchRequest,SearchResult>... handlers)
Sets the search response handlers.
|
equals, getBaseDn, getBinaryAttributes, getDerefAliases, getReturnAttributes, getSearchEntryHandlers, getSearchFilter, getSearchReferenceHandlers, getSearchScope, getSizeLimit, getSortBehavior, getTimeLimit, getTypesOnly, hashCode, newObjectScopeSearchRequest, newObjectScopeSearchRequest, newObjectScopeSearchRequest, newSearchRequest, setBaseDn, setBinaryAttributes, setDerefAliases, setReturnAttributes, setSearchEntryHandlers, setSearchFilter, setSearchReferenceHandlers, setSearchScope, setSizeLimit, setSortBehavior, setTimeLimit, setTypesOnly, toString
getControls, getIntermediateResponseHandlers, getReferralHandler, setControls, setIntermediateResponseHandlers, setReferralHandler
private OperationExceptionHandler<SearchRequest,SearchResult> searchExceptionHandler
private OperationResponseHandler<SearchRequest,SearchResult>[] searchResponseHandlers
private Cache<SearchRequest> searchCache
public OperationExceptionHandler<SearchRequest,SearchResult> getSearchExceptionHandler()
public void setSearchExceptionHandler(OperationExceptionHandler<SearchRequest,SearchResult> handler)
handler
- search exception handlerpublic OperationResponseHandler<SearchRequest,SearchResult>[] getSearchResponseHandlers()
public void setSearchResponseHandlers(OperationResponseHandler<SearchRequest,SearchResult>... handlers)
handlers
- search response handlerspublic Cache<SearchRequest> getSearchCache()
public void setSearchCache(Cache<SearchRequest> cache)
cache
- to setpublic Response<SearchResult> search(ConnectionFactory factory) throws LdapException
factory
- to get a connection fromLdapException
- if the search failspublic Response<SearchResult> search(ConnectionFactory factory, String filter) throws LdapException
factory
- to get a connection fromfilter
- to search withLdapException
- if the search failspublic Response<SearchResult> search(ConnectionFactory factory, SearchFilter filter) throws LdapException
factory
- to get a connection fromfilter
- to search withLdapException
- if the search failspublic Response<SearchResult> search(ConnectionFactory factory, String filter, String... attrs) throws LdapException
factory
- to get a connection fromfilter
- to search withattrs
- to returnLdapException
- if the search failspublic Response<SearchResult> search(ConnectionFactory factory, SearchFilter filter, String... attrs) throws LdapException
factory
- to get a connection fromfilter
- to search withattrs
- to returnLdapException
- if the search failspublic Response<SearchResult> search(ConnectionFactory factory, SearchFilter filter, String[] attrs, SearchEntryHandler... handlers) throws LdapException
factory
- to get a connection fromfilter
- to search withattrs
- to returnhandlers
- entry handlersLdapException
- if the search failsCopyright © 2003-2019 Virginia Tech. All Rights Reserved.