com.ca.jcs.enumeration
Class ProcessingNamingEnumeration
java.lang.Object
com.ca.jcs.enumeration.RawNamingEnumeration<T>
com.ca.jcs.enumeration.LookAheadRawNamingEnumeration<SearchResult>
com.ca.jcs.enumeration.ProcessingNamingEnumeration
- All Implemented Interfaces:
- Enumeration<SearchResult>, NamingEnumeration<SearchResult>
- Direct Known Subclasses:
- AbsoluteQueryResultNamingEnumeration, FilteringNamingEnumeration
public abstract class ProcessingNamingEnumeration
- extends LookAheadRawNamingEnumeration<SearchResult>
A base class for enumerations which want to process entries while stepping through them, allowing for entries to be
skipped when processNext(SearchResult) returns false.
|
Method Summary |
void |
close()
Closes the underlying target enumeration. |
abstract boolean |
processNext(SearchResult result)
Return true if result should be returned to the client, false if it should be skipped. |
boolean |
rawHasMore()
Returns true if at least one object remains for which processNext(SearchResult) returns true. |
| Methods inherited from class com.ca.jcs.enumeration.RawNamingEnumeration |
getCountLimit, getNonFatalException, getTimeLimit, getVisitedCount, hasMore, hasMoreElements, next, nextElement, setCountLimit, setNonFatalException, setTimeLimit |
ProcessingNamingEnumeration
public ProcessingNamingEnumeration(SearchControls searchControls,
NamingEnumeration<SearchResult> target)
- Create an enumeration which process entries read from underlying
target, respecting any time / size limits
in SearchControls.
ProcessingNamingEnumeration
public ProcessingNamingEnumeration(NamingEnumeration<SearchResult> target)
- Create an enumeration which process entries read from underlying
target, should use
ProcessingNamingEnumeration(SearchControls, NamingEnumeration) instead if at all possible as it respects
any configured time / size limits.
processNext
public abstract boolean processNext(SearchResult result)
throws NamingException
- Return true if result should be returned to the client, false if it should be skipped.
- Throws:
NamingException
rawHasMore
public boolean rawHasMore()
throws NamingException
- Returns true if at least one object remains for which
processNext(SearchResult) returns true.
- Specified by:
rawHasMore in class RawNamingEnumeration<SearchResult>
- Throws:
NamingException
close
public void close()
throws NamingException
- Closes the underlying target enumeration.
- Throws:
NamingException
Created 2011-07-14 13:27 EST