stsci.factory
Class FactoryIter

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--stsci.factory.FactoryIter
All Implemented Interfaces:
java.rmi.Remote, RemoteIter, java.io.Serializable

public class FactoryIter
extends java.rmi.server.UnicastRemoteObject
implements RemoteIter

Iterate over the results from a factory query. Fairly simple. In fact it does not do much but it does mean the factories do not have to be remote objects themselves so it is worth doing. Otherwise we could just have Factory implement remoteIter.

See Also:
Serialized Form

Field Summary
protected  ArcObjFactory factory
           
protected  java.lang.Object theNext
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
FactoryIter(ArcObjFactory f)
           
 
Method Summary
 boolean hasNext()
          Should be straight forward but actually not that simple.
 java.lang.Object next()
          Return theNext and getthe next object of possible.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
, clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

theNext

protected java.lang.Object theNext

factory

protected ArcObjFactory factory
Constructor Detail

FactoryIter

public FactoryIter(ArcObjFactory f)
            throws java.rmi.RemoteException
Method Detail

hasNext

public boolean hasNext()
                throws ArchiveException,
                       java.rmi.RemoteException
Should be straight forward but actually not that simple. Dont no if there is a next until we get it !
Specified by:
hasNext in interface RemoteIter

next

public java.lang.Object next()
                      throws ArchiveException,
                             java.rmi.RemoteException
Return theNext and getthe next object of possible. Next is always running one object ahead so it can respond to hasNext().
Specified by:
next in interface RemoteIter