package linda.server; import java.util.Collection; import java.rmi.server.UnicastRemoteObject; import java.rmi.*; import java.rmi.registry.*; import linda.Callback; import linda.Linda; import linda.Tuple; import linda.shm.CentralizedLinda; /** * lindaServer */ public class LindaServer extends UnicastRemoteObject implements LindaRemote { Linda lindaInstance; public LindaServer() throws RemoteException { this.lindaInstance = new CentralizedLinda(); } public void write(Tuple t) { lindaInstance.write(t); } public Tuple take(Tuple template) throws RemoteException { return lindaInstance.take(template); } public Tuple read(Tuple template) throws RemoteException { return lindaInstance.read(template); } public Tuple tryTake(Tuple template) throws RemoteException { return lindaInstance.tryTake(template); } public Tuple tryRead(Tuple template) throws RemoteException { return lindaInstance.tryRead(template); } public Collection takeAll(Tuple template) throws RemoteException { return lindaInstance.takeAll(template); } public Collection readAll(Tuple template) throws RemoteException { return lindaInstance.readAll(template); } public void eventRegister(Linda.eventMode mode, Linda.eventTiming timing, Tuple template, Callback callback) throws RemoteException { lindaInstance.eventRegister(mode, timing, template, callback); } public void debug(String prefix) throws RemoteException { lindaInstance.debug(prefix); } }