com.ca.jcs.jndi
Class PagedResultsNamingEnumeration

java.lang.Object
  extended by com.ca.jcs.enumeration.RawNamingEnumeration<SearchResult>
      extended by com.ca.jcs.jndi.PagedResultsNamingEnumeration
All Implemented Interfaces:
Enumeration<SearchResult>, NamingEnumeration<SearchResult>

public class PagedResultsNamingEnumeration
extends RawNamingEnumeration<SearchResult>

A naming enumeration that hangs to an LDAP context and requests a new page every time that the current one is exhausted. It makes use of one of:

  1. the "paged results" LDAP control denoted by PagedResultsControl.OID). Used where the an LDAP server advertises support for paged results, notably for Microsoft's Active Directory Server which support only paged results for retrieving almost but the smallest sets of results.
  2. the Virtual List View control denoted by OID 2.16.840.1.113730.3.4.9, used by Sun Directory servers and described in draft-ietf-ldapext-ldapv3-vlv.txt, which also has a prerequisite support for the server-side sort control RFC-2891. Although not used by this class, this control allows more sophisticated behaviour like stepping backwards.


Field Summary
static int DEFAULT_PAGED_SIZE
          Used as default page size for JNDIMetaConnector.PagedSearchSupport.SimplePaging case.
static int DEFAULT_VLIST_SIZE
          Used as default page size for JNDIMetaConnector.PagedSearchSupport.VirtualListViewPaging case.
 
Fields inherited from class com.ca.jcs.enumeration.RawNamingEnumeration
countLimit, scope, startTime, timeLimit, visitedCount
 
Constructor Summary
PagedResultsNamingEnumeration(JNDIMetaConnector connector, LdapContext connection, Name baseDn, FilterInfo filterInfo, SearchControls searchControls, int pageSize)
           
 
Method Summary
 void close()
           
 boolean rawHasMore()
          Override this method to return whether more values remain to be returned.
 SearchResult rawNext()
          Override this method to return next value to be returned from next().
 
Methods inherited from class com.ca.jcs.enumeration.RawNamingEnumeration
getCountLimit, getNonFatalException, getTimeLimit, getVisitedCount, hasMore, hasMoreElements, next, nextElement, setCountLimit, setNonFatalException, setTimeLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAGED_SIZE

public static final int DEFAULT_PAGED_SIZE
Used as default page size for JNDIMetaConnector.PagedSearchSupport.SimplePaging case.

See Also:
Constant Field Values

DEFAULT_VLIST_SIZE

public static final int DEFAULT_VLIST_SIZE
Used as default page size for JNDIMetaConnector.PagedSearchSupport.VirtualListViewPaging case.

See Also:
Constant Field Values
Constructor Detail

PagedResultsNamingEnumeration

public PagedResultsNamingEnumeration(JNDIMetaConnector connector,
                                     LdapContext connection,
                                     Name baseDn,
                                     FilterInfo filterInfo,
                                     SearchControls searchControls,
                                     int pageSize)
                              throws NamingException
Throws:
NamingException
Method Detail

rawHasMore

public boolean rawHasMore()
                   throws NamingException
Description copied from class: RawNamingEnumeration
Override this method to return whether more values remain to be returned.

Specified by:
rawHasMore in class RawNamingEnumeration<SearchResult>
Throws:
NamingException

rawNext

public SearchResult rawNext()
                     throws NamingException
Description copied from class: RawNamingEnumeration
Override this method to return next value to be returned from next().

Specified by:
rawNext in class RawNamingEnumeration<SearchResult>
Throws:
NamingException

close

public void close()
           throws NamingException
Throws:
NamingException


Created 2011-07-14 13:27 EST