|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.control.util.PagedResultsClient
public class PagedResultsClient
Client that simplifies using the paged results control.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
PagedResultsClient(Connection conn,
int size)
Creates a new paged results client. |
|
| Method Summary | |
|---|---|
Response<SearchResult> |
execute(SearchRequest request)
Performs a search operation with the PagedResultsControl. |
Response<SearchResult> |
execute(SearchRequest request,
CookieManager manager)
Performs a search operation with the PagedResultsControl. |
Response<SearchResult> |
execute(SearchRequest request,
Response<SearchResult> response)
Performs a search operation with the PagedResultsControl. |
Response<SearchResult> |
executeToCompletion(SearchRequest request)
Performs a search operation with the PagedResultsControl. |
Response<SearchResult> |
executeToCompletion(SearchRequest request,
CookieManager manager)
Performs a search operation with the PagedResultsControl. |
protected byte[] |
getPagedResultsCookie(Response<SearchResult> response)
Returns the paged results cookie in the supplied response or null if no cookie exists. |
boolean |
hasMore(Response<SearchResult> response)
Returns whether execute(SearchRequest, Response) can be invoked
again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public PagedResultsClient(Connection conn,
int size)
conn - to execute the search operation onsize - the results page size to request| Method Detail |
|---|
public Response<SearchResult> execute(SearchRequest request)
throws LdapException
PagedResultsControl. The
supplied request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with PagedResultsControl
request - search request to execute
LdapException - if the search fails
public Response<SearchResult> execute(SearchRequest request,
Response<SearchResult> response)
throws LdapException
PagedResultsControl. The
supplied request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with PagedResultsControlThe cookie is extracted from the supplied response and replayed in the request.
request - search request to executeresponse - of a previous paged results operation
LdapException - if the search fails
public Response<SearchResult> execute(SearchRequest request,
CookieManager manager)
throws LdapException
PagedResultsControl. The
supplied request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with PagedResultsControlThe cookie used in the request is read from the cookie manager and written to the cookie manager after a successful search, if the response contains a cookie.
request - search request to executemanager - for reading and writing cookies
LdapException - if the search failspublic boolean hasMore(Response<SearchResult> response)
execute(SearchRequest, Response) can be invoked
again.
response - of a previous paged results operation
public Response<SearchResult> executeToCompletion(SearchRequest request)
throws LdapException
PagedResultsControl. The
supplied request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with PagedResultsControlThis method will continue to execute search operations until all paged search results have been retrieved from the server. The returned response contains the response data of the last paged result operation plus the entries and references returned by all previous search operations.
request - search request to execute
LdapException - if the search fails
public Response<SearchResult> executeToCompletion(SearchRequest request,
CookieManager manager)
throws LdapException
PagedResultsControl. The
supplied request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with PagedResultsControlThis method will continue to execute search operations until all paged search results have been retrieved from the server. The returned response contains the response data of the last paged result operation plus the entries and references returned by all previous search operations.
The cookie used for each request is read from the cookie manager and written to the cookie manager after a successful search, if the response contains a cookie.
request - search request to executemanager - for reading and writing cookies
LdapException - if the search failsprotected byte[] getPagedResultsCookie(Response<SearchResult> response)
response - of a previous paged results operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||