package interfejsy; import java.time.Duration; // lookup rmiregistry nazwa,host,port public interface IWorker extends Remote{ public boolean setTask(String task, Duration d, Object o) throws RemoteException; public String getState() throws RemoteException;// "liczbaZadaƄ,sumarycznyCzasMS" public int getNumber() throws RemoteException; } // rebind rmiregistry nazwa,port public interface IRegistry extends Remote{ public int registerObject(Object o) throws RemoteException; public boolean unregisterObject(int number) throws RemoteException; public Object getManager() throws RemoteException; public List getWorkers() throws RemoteException; //IWorker.class.isInstance(o) } // lookup rmiregistry nazwa,host,port public interface IManager extends Remote { public void assignTask(String task, Duration d, Object o) throws RemoteException; public void refresh() throws RemoteException; } // lookup rmiregistry nazwa,host,port public interface IClient extends Remote { public void setResult(String r); }