| CONTENTS | PREV | NEXT | Java Remote Method Invocation |
ServerRef Interface
The interfaceServerRefrepresents 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 methodexportObjectfinds or creates a client stub object for the suppliedRemoteobject implementation obj.The parameter data contains information necessary to export the object (such as port number).The method
getClientHostreturns 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, thenServerNotActiveExceptionis called.