|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.jcr.rmi.api.client.ClientObject
org.exoplatform.services.jcr.rmi.api.client.iterator.ClientIterator
public abstract class ClientIterator
A buffering local adapter for the JCR-RMI 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 Summary | |
|---|---|
ClientIterator(RemoteIterator remote,
LocalAdapterFactory factory)
Creates a local adapter for the given remote iterator. |
|
| Method Summary | |
|---|---|
protected abstract java.lang.Object |
getObject(java.lang.Object remote)
Returns a local adapter for the given remote object. |
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. |
| Methods inherited from class org.exoplatform.services.jcr.rmi.api.client.ClientObject |
|---|
getFactory, getItem, getNode, getNodeTypeArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientIterator(RemoteIterator remote,
LocalAdapterFactory factory)
remote - remote iteratorfactory - local adapter factory| Method Detail |
|---|
public long getPosition()
getPosition in interface javax.jcr.RangeIteratorRangeIterator.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.
getSize in interface javax.jcr.RangeIterator-1
RemoteRuntimeException - 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.
skip in interface javax.jcr.RangeIteratorskipNum - the number of elements to skip
java.util.NoSuchElementException - if skipped past the last element
RemoteRuntimeException - on RMI errorsRangeIterator.skip(long)
public boolean hasNext()
throws RemoteRuntimeException
hasNext in interface java.util.Iteratortrue if there are more elements, false otherwise
RemoteRuntimeException - on RMI errorsIterator#hasNext()protected abstract java.lang.Object getObject(java.lang.Object remote)
next() to convert the remote references returned by the remote iterator to local
adapters.
Subclasses should implement this method to use the local adapter factory to create local adapters of the specific element type.
remote - remote object
public java.lang.Object next()
throws java.util.NoSuchElementException,
RemoteRuntimeException
next in interface java.util.Iteratorjava.util.NoSuchElementException - if there are no more elements
RemoteRuntimeException - on RMI errorsIterator#next()
public void remove()
throws java.lang.UnsupportedOperationException
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - always thrownIterator#remove()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||