public class Ref extends java.lang.Object implements java.rmi.server.RemoteRef, Constants
RemoteRef interface for this
RMI implementation. Instances of this class are passed to a Remote object's RemoteStub implementation.
These instances then get serialized and sent to the RMI client.DGC_PING, METHOD_CALL, METHOD_ERROR, METHOD_RESULT, SYSTEM_ERROR| Constructor and Description |
|---|
Ref()
Public noargs constructor required for serialization.
|
Ref(java.lang.String host,
int port,
java.rmi.server.ObjID oid,
ClientInterceptor clint)
Constructs a Ref instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(Ref ref)
Make this Ref instance identical to the given Ref.
|
void |
done(java.rmi.server.RemoteCall call)
Delegates to
RemoteCall#done(). |
void |
finalize() |
java.lang.String |
getHost()
Returns the remote host pointed to by this Ref.
|
java.rmi.server.ObjID |
getOID()
Returns the oid of this Ref.
|
int |
getPort()
Returns the port on the remote host pointed to by this Ref.
|
java.lang.String |
getRefClass(java.io.ObjectOutput out)
Returns null.
|
void |
invoke(java.rmi.server.RemoteCall call)
Delegates to
RemoteCall.executeCall(). |
java.lang.Object |
invoke(java.rmi.Remote rem,
java.lang.reflect.Method meth,
java.lang.Object[] args,
long hash) |
java.rmi.server.RemoteCall |
newCall(java.rmi.server.RemoteObject obj,
java.rmi.server.Operation[] ops,
int opnum,
long hash)
Returns a new
RemoteCall object. |
void |
readExternal(java.io.ObjectInput in) |
boolean |
remoteEquals(java.rmi.server.RemoteRef obj) |
int |
remoteHashCode() |
java.lang.String |
remoteToString() |
void |
writeExternal(java.io.ObjectOutput out) |
public Ref()
public Ref(java.lang.String host,
int port,
java.rmi.server.ObjID oid,
ClientInterceptor clint)
host - the remote hostport - the port on the remote hostoid - the ObjID of the remote objectclint - a ClientInterceptor or nullpublic java.rmi.server.ObjID getOID()
public java.lang.String getHost()
public int getPort()
public void connect(Ref ref)
ref - the ref to duplicatepublic java.lang.Object invoke(java.rmi.Remote rem,
java.lang.reflect.Method meth,
java.lang.Object[] args,
long hash)
throws java.lang.Exception
invoke in interface java.rmi.server.RemoteRefjava.lang.Exceptionpublic java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject obj,
java.rmi.server.Operation[] ops,
int opnum,
long hash)
RemoteCall object. This is only used for
v1.1 stubs.newCall in interface java.rmi.server.RemoteRefobj - the stubops - the operations contained by the stubopnum - the opnum to be invokedhash - the interface hash for this remote objectpublic void invoke(java.rmi.server.RemoteCall call)
throws java.lang.Exception
RemoteCall.executeCall().invoke in interface java.rmi.server.RemoteRefcall - the RemoteCall obtained from invoking newCall(RemoteObject, Operation[], int, long)java.lang.Exceptionpublic void done(java.rmi.server.RemoteCall call)
RemoteCall#done().done in interface java.rmi.server.RemoteRefcall - the RemoteCall obtained from invoking newCall(RemoteObject, Operation[], int, long)public java.lang.String getRefClass(java.io.ObjectOutput out)
RemoteObject implementation that this Ref should be
serialized and sent directly to the client rather than being
replaced with a RemoteRef implementation from the
client's RMI system.getRefClass in interface java.rmi.server.RemoteRefout - this is ignoredpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void finalize()
finalize in class java.lang.Objectpublic boolean remoteEquals(java.rmi.server.RemoteRef obj)
remoteEquals in interface java.rmi.server.RemoteRefpublic int remoteHashCode()
remoteHashCode in interface java.rmi.server.RemoteRefpublic java.lang.String remoteToString()
remoteToString in interface java.rmi.server.RemoteRef