import java.rmi.*; import java.rmi.server.*; public class GluerRMIImplementation extends UnicastRemoteObject implements GluerRMIInterface { private EventRemoteGluer remoteGluer; private String name; public GluerRMIImplementation(String name, EventRemoteGluer remoteGluer) throws RemoteException { super(); this.remoteGluer = remoteGluer; this.name = name; init(); } private void init() { /* // create and install a security manager if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } */ try { // bind this object instance to the name Naming.rebind(name, this); } catch (Exception e) { System.out.println(e); } } public void hasANewEvent(Event event) { remoteGluer.hasANewEvent(event); } }