CONTENTS | PREV | NEXT | Java Remote Method Invocation |
The interface ServerRef represents the server-side handle for a remote object implementation.
package java.rmi.server; public interface ServerRef extends RemoteRef { RemoteStub exportObject(java.rmi.Remote obj, Object data) throws java.rmi.RemoteException; String getClientHost() throws ServerNotActiveException; }
The methodexportObject
finds or creates a client stub object for the supplied Remote object implementation obj.The parameter data contains information necessary to export the object (such as port number).The method
getClientHost
returns the host name of the current client. When called from a thread actively handling a remote method invocation, the host name of the client invoking the call is returned. If a remote method call is not currently being service, then ServerNotActiveException is called.