import java.time.Duration; // available since JDK 1.8 public class Order implements Serializable{ public String advertText; public Duration displayPeriod; public IClient client; } public interface IBillboard extends Remote{ // host, port, nazwa; public boolean addAdvertisement(String advertText, Duration displayPeriod, int orderId) throws RemoteException; public boolean removeAdvertisement(int orderId) throws RemoteException; public int[] getCapacity() throws RemoteException; // returns table of two integers {totalSlots, freeSlots} public void setDisplayInterval(Duration displayInterval) throws RemoteException; public boolean start() throws RemoteException; public boolean stop() throws RemoteException; } public interface IClient extends Remote{ // host, port, nazwa public void setOrderId(int orderId) throws RemoteException; } public interface IManager extends Remote{ // port, nazwa, GUI public int bindBillboard(IBillboard billboard) throws RemoteException; public boolean unbindBillboard(int billboardId) throws RemoteException; public boolean placeOrder(Order order) throws RemoteException; public boolean withdrawOrder(int orderId) throws RemoteException; }