ClientIteratorpublic class ClientIterator extends Object implements Serializable, IteratorThe client portion of the distributed iterator support. This class
implements the Iterator interface for a distributed
iterator. Using distributed iterators, you can ship a collection across
the network one element at a time, thus transmitting only the data
required by the application. Furthermore, by avoiding transmitting
the entire collection, you enable access to the initial elements of
the collection quicker than would be possible through raw serialization
of a collection.
Last modified $Date: 1999/11/06 19:50:59 $ |
Fields Summary |
---|
private DistributedIterator | sourceThe remote iterator to which this client is referencing. |
Constructors Summary |
---|
public ClientIterator()Required constructor for serialization.
super();
| public ClientIterator(DistributedIterator src)Constructs a new ClientIterator using the named
DistributedIterator as its remote source.
super();
source = src;
|
Methods Summary |
---|
public boolean | hasNext()
try {
return source.hasNext();
}
catch( RemoteException e ) {
return false;
}
| public java.lang.Object | next()
try {
Object ob = source.next();
return ob;
//return source.next();
}
catch( RemoteException e ) {
e.printStackTrace();
return null;
}
| public void | remove()This operation is unsupported in this implementation.
try {
source.remove();
}
catch( RemoteException e ) {
}
|
|