Spec-Zone .ru
спецификации, руководства, описания, API
|
CONTENTS | PREV | NEXT | Java Remote Method Invocation |
ServerRef
Interface
The interfaceServerRef
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 suppliedRemote
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, thenServerNotActiveException
is called.