Package org.springframework.ldap.control
Class PagedResultsControlExchangeDirContextProcessor
java.lang.Object
org.springframework.ldap.control.ControlExchangeDirContextProcessor<PagedResultsControl,PagedResultsResponseControl>
org.springframework.ldap.control.PagedResultsControlExchangeDirContextProcessor
- All Implemented Interfaces:
DirContextProcessor
public final class PagedResultsControlExchangeDirContextProcessor
extends ControlExchangeDirContextProcessor<PagedResultsControl,PagedResultsResponseControl>
A specialized
DirContextProcessor for managing LDAP paged results controls.
This processor simplifies working with paged LDAP search results as defined in
RFC 2696. It provides a
convenient hasMore() method for determining if additional pages are available,
making it easy to iterate through all pages of results.
Paging requires that the same LDAP connection be used across each page. Spring LDAP's
SingleContextSource and
TransactionAwareContextSourceProxy
provide this capability when wired into
LdapTemplate and
LdapClient instances.
-
Constructor Summary
ConstructorsConstructorDescriptionPagedResultsControlExchangeDirContextProcessor(int pageSize) Constructs a paged results processor with the specified page size. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasMore()Determines whether there are more pages of results available.Methods inherited from class org.springframework.ldap.control.ControlExchangeDirContextProcessor
getExchange, postProcess, preProcess
-
Constructor Details
-
PagedResultsControlExchangeDirContextProcessor
public PagedResultsControlExchangeDirContextProcessor(int pageSize) Constructs a paged results processor with the specified page size.- Parameters:
pageSize- the number of entries to return in each page
-
-
Method Details
-
hasMore
public boolean hasMore()Determines whether there are more pages of results available.This method checks if the server returned a non-null cookie in the response control, which indicates that additional results are available.
- Returns:
trueif more pages are available,falseotherwise
-