lima.distribution
Class WUPipe

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--lima.distribution.WUPipe
All Implemented Interfaces:
java.rmi.Remote, java.io.Serializable, WorkUnitSource

public class WUPipe
extends java.rmi.server.UnicastRemoteObject
implements WorkUnitSource

A WUPipe provides the inverse interface to a WUSource. A WUSource provides call back methods, whereas a WUPipe provides a send and alldone methods

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
WUPipe(java.lang.String name)
           
 
Method Summary
 java.lang.String getOwner()
          Return a textual description of a source's owner.
 boolean hasNext()
          Will next() succeed?
 lima.distribution.WorkUnit next()
          Return the next WorkUnit that needs to be processed.
 void send(lima.distribution.WorkUnit u)
          Doesn't return until u has been sent.
 void sendLast(lima.distribution.WorkUnit u)
           
 void setAllDone()
           
 
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
 

Constructor Detail

WUPipe

public WUPipe(java.lang.String name)
       throws java.rmi.RemoteException
Method Detail

send

public void send(lima.distribution.WorkUnit u)
Doesn't return until u has been sent.

Parameters:
u -

sendLast

public void sendLast(lima.distribution.WorkUnit u)

setAllDone

public void setAllDone()

next

public lima.distribution.WorkUnit next()
                                throws java.rmi.RemoteException
Description copied from interface: WorkUnitSource
Return the next WorkUnit that needs to be processed. MUST NOT be called if hasNext()==false.

Specified by:
next in interface WorkUnitSource
Returns:
WorkUnit - -The next WorkUnit
java.rmi.RemoteException
See Also:
WorkUnitSource.next()

hasNext

public boolean hasNext()
                throws java.rmi.RemoteException
Description copied from interface: WorkUnitSource
Will next() succeed?

Specified by:
hasNext in interface WorkUnitSource
Returns:
boolean
java.rmi.RemoteException
See Also:
WorkUnitSource.hasNext()

getOwner

public java.lang.String getOwner()
Description copied from interface: WorkUnitSource
Return a textual description of a source's owner.

Specified by:
getOwner in interface WorkUnitSource