public interface RemoteRef extends Externalizable RemoteStub contains such handler and uses it to invoke remote
methods via invoke(Remote,Method,Object[],long).
static String packagePrefix static long serialVersionUID void done(RemoteCall call)invoke(Remote,Method,Object[],long) instead. String getRefClass(ObjectOutput out) void invoke(RemoteCall call)invoke(Remote,Method,Object[],long) instead. RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash)invoke(Remote,Method,Object[],long) instead. boolean remoteEquals(RemoteRef ref) int remoteHashCode() String remoteToString()public static final String packagePrefix
For binary compatibility with the JDK, the string "sun.rmi.server". Not actually used for anything.
- Field Value:
- "sun.rmi.server"
public static final long serialVersionUID
Indicates compatibility with JDK 1.1.*
- Field Value:
- 3632638527362204081L
public void done(RemoteCall call) throws RemoteException
Deprecated. use
invoke(Remote,Method,Object[],long)instead.
public String getRefClass(ObjectOutput out)
Returns the class name of the reference type that must be written to the given stream. When writing, this returned name is passed first, and the reference.writeExternal(out) writes the reference specific data.
- Parameters:
out- the stream, where the data must be written
- Returns:
- the class name.
public Object invoke(Remote obj, Method method, Object[] params, long methodHash) throws Exception
Invoke a method. This method either returns the result of remote invocation or throws RemoteException if the remote call failed. Other exceptions may be thrown if some problem has occured in the application level.
- Parameters:
obj- the object, containing the remote reference (for instance, remote stub, generated by rmic).method- the method to invokeparams- the method parametersmethodHash- a persistent hash code that can be used to represent a method
- Returns:
- the result of the remote invocation
- Throws:
Exception- if one is raised at the application level
public void invoke(RemoteCall call) throws Exception
Deprecated. use
invoke(Remote,Method,Object[],long)instead.
public RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash) throws RemoteException
Deprecated. use
invoke(Remote,Method,Object[],long)instead.
public boolean remoteEquals(RemoteRef ref)
Compare two remote objects for equality. The references are equal if they point to the same remote object.
- Parameters:
ref- the reference to compare.
- Returns:
- true if this and passed references both point to the same remote object, false otherwise.
public int remoteHashCode()
Get the hashcode for a remote object. Two remote object stubs, referring to the same remote object, have the same hash code.
- Returns:
- the hashcode of the remote object
public String remoteToString()
Get the string representation of this remote reference.
- Returns:
- the string representation.