public abstract class ClientIterator extends ClientObject
RemoteIterator
interface. This class makes the remote iterator locally available
using the JCR RangeIterator interface. The element arrays
returned by the remote iterator are buffered locally.
See the subclasses for type-specific versions of this abstract class.
| Constructor and Description |
|---|
ClientIterator(RemoteIterator remote,
LocalAdapterFactory factory)
Creates a local adapter for the given remote iterator.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getPosition()
Returns the current position within the iterator.
|
long |
getSize()
Returns the size (the total number of elements) of this iteration.
|
boolean |
hasNext()
Checks if there are more elements in this iteration.
|
java.lang.Object |
next()
Returns the next element in this iteration.
|
void |
remove()
Not supported.
|
void |
skip(long skipNum)
Skips the given number of elements in this iteration.
|
public ClientIterator(RemoteIterator remote, LocalAdapterFactory factory)
remote - remote iteratorfactory - local adapter factorypublic long getPosition()
RangeIterator#getPosition()public long getSize()
throws RemoteRuntimeException
-1 if the size is unknown.
To minimize the number of remote method calls, the size is retrieved when this method is first called and cached for subsequent invocations.
-1RemoteRuntimeException - on RMI errorsRangeIterator#getSize()public void skip(long skipNum)
throws java.util.NoSuchElementException,
RemoteRuntimeException
The elements in the local element buffer are skipped first, and a remote skip method call is made only if more elements are being skipped than remain in the local buffer.
skipNum - the number of elements to skipjava.util.NoSuchElementException - if skipped past the last elementRemoteRuntimeException - on RMI errorsRangeIterator#skip(long)public boolean hasNext()
throws RemoteRuntimeException
true if there are more elements,
false otherwiseRemoteRuntimeException - on RMI errorsIterator#hasNext()public java.lang.Object next()
throws java.util.NoSuchElementException,
RemoteRuntimeException
java.util.NoSuchElementException - if there are no more elementsRemoteRuntimeException - on RMI errorsIterator#next()public void remove()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - always thrownIterator#remove()"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"