public abstract class ServerIterator extends ServerObject implements RemoteIterator
RangeIterator
interface. This
class makes a local iterator available as an RMI service using teh
RemoteIterator
interface.Constructor and Description |
---|
ServerIterator(RangeIterator iterator,
RemoteAdapterFactory factory,
int maxBufferSize)
Creates a remote adapter for the given local item.
|
Modifier and Type | Method and Description |
---|---|
long |
getSize()
Returns the size of the iterator.
|
Object[] |
nextObjects()
Returns an array of remote references to the next elements in this
iteration.
|
void |
skip(long items)
Skips the given number of elements.
|
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public ServerIterator(RangeIterator iterator, RemoteAdapterFactory factory, int maxBufferSize) throws RemoteException
iterator
- local iterator to be adaptedfactory
- remote adapter factorymaxBufferSize
- maximum buffer sizeRemoteException
- on RMI errorspublic long getSize() throws RemoteException
getSize
in interface RemoteIterator
RemoteException
- on RMI errorsRemoteIterator.getSize()
,
RangeIterator#getSize()
public void skip(long items) throws NoSuchElementException, RemoteException
skip
in interface RemoteIterator
items
- number of elements to skipNoSuchElementException
- if skipped past the last elementRemoteException
- on RMI errorsRangeIterator
public Object[] nextObjects() throws RemoteException
nextObjects
in interface RemoteIterator
null
RemoteException
- on RMI errorsRemoteIterator#nextObjects(int)
,
Iterator.next()
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"