lima.distribution
Interface WorkUnitServer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DServer

public interface WorkUnitServer
extends java.rmi.Remote

The client-server interface - a WorkUnitServer provides WorkUnits to the clients that provide processing cycles. Once the client gets a handle to a WorkUnitServer, it should do something like this: while(!bored) { WorkUnit w = workunitserver. requestWorkUnit(); w.run(); workunitserver. submitWorkUnit(w); }


Method Summary
 lima.distribution.WorkUnit requestWorkUnit()
          Request a WorkUnit from the server.
 void submitWorkUnit(lima.distribution.WorkUnit u)
          Submit a finished WorkUnit back to the server.
 

Method Detail

requestWorkUnit

public lima.distribution.WorkUnit requestWorkUnit()
                                           throws java.rmi.RemoteException,
                                                  NoWorkException
Request a WorkUnit from the server. Clients SHOULD NOT request work and then not do it, but the server SHOULD NOT assume clients return all work.

Returns:
WorkUnit - A WorkUnit that needs processing (call run() on it)
java.rmi.RemoteException
NoWorkException

submitWorkUnit

public void submitWorkUnit(lima.distribution.WorkUnit u)
                    throws java.rmi.RemoteException
Submit a finished WorkUnit back to the server. It SHOULD have been processed.

Parameters:
u - - The finished WorkUnit.
java.rmi.RemoteException