// PipeServer.java
import java.rmi.*;
import java.rmi.server.*;


public class PipeServer extends UnicastRemoteObject
	implements PipeRemote {
	
	public PipeServer() throws RemoteException {	
		super();
	}
	
	public void send(String message) throws RemoteException {
		Log.print("PipeServer: got message " + message);
	}
	
	public void sendRunnable(Runnable runnable) throws RemoteException {
		Log.print("PipeServer: got runnable");
		// Run the thing they sent us in its own thread, or could just call runnable.run()
		Thread thread = new Thread(runnable);
		thread.start();
	}
}
