Class 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.

Since:
4.1
See Also:
  • 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:
      true if more pages are available, false otherwise