package jicos.system; import java.rmi.*; /** Interface used to communicate from the application to the * HSP. */ public interface HSP extends Remote { /** Service name used in rmiregistry. */ public static String NAME = "HSP"; /** Get a Result from the HSP. This method * blocks until a Result is available. * @return a Result object that corresponds to some Task that was sent to the * HSP via the putTask method (i.e., for some particular task DAG). * @throws RemoteException This method is invoked remotely. */ public Result getResult() throws RemoteException; /** Application gives a task to the HSP. * @param task is the root task of some Task graph. * @param computationId is an identifier for a computation (i.e., a root task). * @throws RemoteException This method is invoked remotely. */ public void compute( Task task, int computationId ) throws RemoteException; /** login Client with the HSP. * @throws RemoteException This method is invoked remotely. * @param clientInfo Data container for client information associated with this consumer * client during this registration period (session). */ public void login( Environment environment ) throws RemoteException; /** logout Client from the HSP. * @return Invoice, an object indicating how much system resources were * consumed by this application. * @throws RemoteException This method is invoked remotely. */ public Invoice logout() throws RemoteException, InterruptedException; }