ibis.rmi.server
Interface ServerRef

All Superinterfaces:
Externalizable, RemoteRef, Serializable

public interface ServerRef
extends RemoteRef

A ServerRef represents the server side handle for a remote object.


Method Summary
 RemoteStub exportObject(Remote obj, Object data)
          Creates a stub object for the remote object specified.
 String getClientHost()
          Returns the hostname of the current client, but only when called from a thread handling a remote method invocation.
 
Methods inherited from interface ibis.rmi.server.RemoteRef
getRefClass, remoteEquals, remoteHashCode, remoteToString
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Method Detail

exportObject

RemoteStub exportObject(Remote obj,
                        Object data)
                        throws RemoteException
Creates a stub object for the remote object specified.

Parameters:
obj - the remote object (implementation)
data - information for exporting the object
Returns:
a stub for the remote object
Throws:
RemoteException - if the export fails

getClientHost

String getClientHost()
                     throws ServerNotActiveException
Returns the hostname of the current client, but only when called from a thread handling a remote method invocation. If not, an exception is thrown.

Returns:
the hostname of the client
Throws:
ServerNotActiveException - if not called from a thread that is currently servicing a remote method invocation


The Ibis project