// Copyright © 1998 Sun Microsystems, Inc. All Rights Reserved. // package examples.activation; import java.rmi.*; import java.rmi.activation.*; public class MyRemoteInterfaceImpl extends Activatable implements examples.activation.MyRemoteInterface { // The constructor for activation and export; this constructor is // called by the method ActivationInstantiator.newInstance during // activation, to construct the object. // public MyRemoteInterfaceImpl(ActivationID id, MarshalledObject data) throws RemoteException { // Register the object with the activation system // then export it on an anonymous port // super(id, 0); } // Implement the method declared in MyRemoteInterface // public Object callMeRemotely() throws RemoteException { return "Successful execution of callMeRemotely() in " + "MyRemoteInterfaceImpl"; } }