public interface LDAPSearchRequest extends LDAPRequest
Note that LDAPSearchRequest objects should not be considered threadsafe, thus should not be used concurrently by multiple threads. Each thread wishing to process a request should have its own instance of that request.
Modifier and Type | Method and Description |
---|---|
LDAPSearchRequest |
clone()
Creates and returns a copy of this search request that may be modified without
impacting this request.
|
java.lang.String[] |
getAttributes()
Returns the set of requested attributes to include in matching entries.
|
java.lang.String |
getBase()
Returns the base distinguished name for this search request.
|
java.lang.String |
getFilter()
Returns the filter for this search request.
|
LDAPSearchScope |
getScope()
Returns the scope for this search request.
|
int |
getSizeLimit()
Returns the maximum number of entries that should be returned by the server when
processing this search request.
|
int |
getTimeLimit()
Returns the maximum time, in seconds, that the server should spend processing this
search request.
|
boolean |
isTypesOnly()
Returns whether the server should return only attribute names in matching entries,
rather than both names and values.
|
LDAPSearchRequest |
setAttributes(java.lang.String... attributes)
Sets the set of requested attributes to include in matching entries.
|
LDAPSearchRequest |
setBase(java.lang.String base)
Sets the base distinguished name for this search request.
|
LDAPSearchRequest |
setFilter(java.lang.String filter)
Sets the filter for this search request.
|
LDAPSearchRequest |
setQueryTimeout(long timeout)
Sets the maximum time, in milliseconds, to wait for a response from the server when
processing this search request.
|
LDAPSearchRequest |
setScope(LDAPSearchScope scope)
Sets the scope for this search request.
|
LDAPSearchRequest |
setSizeLimit(int sizeLimit)
Sets the maximum number of entries that should be returned by the server when
processing this search request.
|
LDAPSearchRequest |
setTimeLimit(int timeLimit)
Sets the maximum time, in seconds, that the server should spend processing this search
request.
|
LDAPSearchRequest |
setTypesOnly(boolean typesOnly)
Sets whether the server should return only attribute names in matching entries,
rather than both names and values.
|
getQueryTimeout
LDAPSearchRequest clone()
clone
in interface LDAPRequest
java.lang.String getBase()
LDAPSearchRequest setBase(java.lang.String base)
base
- the base distinguished name for this search request. It must not be null.LDAPSearchScope getScope()
LDAPSearchRequest setScope(LDAPSearchScope scope)
scope
- the scope for this search request.java.lang.String getFilter()
LDAPSearchRequest setFilter(java.lang.String filter) throws LDAPException
filter
- the filter for this search request. It must not be null.LDAPException
boolean isTypesOnly()
LDAPSearchRequest setTypesOnly(boolean typesOnly)
typesOnly
- true if the names but not the values of the attributes should be
returned in matching entries, or false if both names and values
of the attributes should be returned.int getSizeLimit()
LDAPSearchRequest setSizeLimit(int sizeLimit)
sizeLimit
- the maximum number of entries that should be returned by the
server when processing this search request.LDAPSearchRequest setQueryTimeout(long timeout)
setQueryTimeout
in interface LDAPRequest
timeout
- the maximum time, in milliseconds, to wait for a response from the
server when processing this search request.int getTimeLimit()
LDAPSearchRequest setTimeLimit(int timeLimit)
Note that if an attempt to process a search operation fails because the time limit has been exceeded, an LDAPSearchException will be thrown.
timeLimit
- the maximum time, in seconds, that the server should spend processing
this search request.java.lang.String[] getAttributes()
LDAPSearchRequest setAttributes(java.lang.String... attributes)
attributes
- the set of requested attributes to include in matching entries.