public class

ActivatableRef

extends Object
implements RemoteRef
java.lang.Object
   ↳ sun.rmi.server.ActivatableRef

Summary

[Expand]
Inherited Constants
From interface java.rmi.server.RemoteRef
Fields
protected ActivationID id
protected RemoteRef ref
Public Constructors
ActivatableRef()
Create a new (empty) ActivatableRef
ActivatableRef(ActivationID id, RemoteRef ref)
Create a ActivatableRef with the specified id
Public Methods
void done(RemoteCall call)
This call is used by the old 1.1 stub protocol and is unsupported since activation requires 1.2 stubs.
String getRefClass(ObjectOutput out)
Returns the class of the ref type to be serialized
static Remote getStub(ActivationDesc desc, ActivationID id)
Returns the stub for the remote object whose class is specified in the activation descriptor.
void invoke(RemoteCall call)
This call is used by the old 1.1 stub protocol and is unsupported since activation requires 1.2 stubs.
Object invoke(Remote obj, Method method, Object[] params, long opnum)
Invoke method on remote object.
synchronized RemoteCall newCall(RemoteObject obj, Operation[] ops, int opnum, long hash)
This call is used by the old 1.1 stub protocol and is unsupported since activation requires 1.2 stubs.
void readExternal(ObjectInput in)
Read in external representation for remote ref.
boolean remoteEquals(RemoteRef ref)
default implementation of equals for remote objects
int remoteHashCode()
default implementation of hashCode for remote objects
String remoteToString()
Method from object, forward from RemoteObject
void writeExternal(ObjectOutput out)
Write out external representation for remote ref.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.io.Externalizable
From interface java.rmi.server.RemoteRef

Fields

protected ActivationID id

protected RemoteRef ref

Public Constructors

public ActivatableRef ()

Create a new (empty) ActivatableRef

public ActivatableRef (ActivationID id, RemoteRef ref)

Create a ActivatableRef with the specified id

Public Methods

public void done (RemoteCall call)

This call is used by the old 1.1 stub protocol and is unsupported since activation requires 1.2 stubs.

Parameters
call object representing remote call

public String getRefClass (ObjectOutput out)

Returns the class of the ref type to be serialized

Parameters
out the output stream to which the reference will be serialized
Returns
  • the class name (without package qualification) of the reference type

public static Remote getStub (ActivationDesc desc, ActivationID id)

Returns the stub for the remote object whose class is specified in the activation descriptor. The ActivatableRef in the resulting stub has its activation id set to the activation id supplied as the second argument.

public void invoke (RemoteCall call)

This call is used by the old 1.1 stub protocol and is unsupported since activation requires 1.2 stubs.

Parameters
call object representing remote call
Throws
Exception

public Object invoke (Remote obj, Method method, Object[] params, long opnum)

Invoke method on remote object. This method delegates remote method invocation to the underlying ref type. If the underlying reference is not known (is null), then the object must be activated first. If an attempt at method invocation fails, the object should force reactivation. Method invocation must preserve "at most once" call semantics. In RMI, "at most once" applies to parameter deserialization at the remote site and the remote object's method execution. "At most once" does not apply to parameter serialization at the client so the parameters of a call don't need to be buffered in anticipation of call retry. Thus, a method call is only be retried if the initial method invocation does not execute at all at the server (including parameter deserialization).

Parameters
obj the object that contains the RemoteRef (e.g., the RemoteStub for the object.
method the method to be invoked
params the parameter list
opnum a hash that may be used to represent the method
Returns
  • result of remote method invocation
Throws
Exception

public synchronized RemoteCall newCall (RemoteObject obj, Operation[] ops, int opnum, long hash)

This call is used by the old 1.1 stub protocol and is unsupported since activation requires 1.2 stubs.

Parameters
obj remote stub through which to make call
ops array of stub operations
opnum operation number
hash stub/skeleton interface hash
Returns
  • call object representing remote call

public void readExternal (ObjectInput in)

Read in external representation for remote ref.

Parameters
in the stream to read data from in order to restore the object
Throws
ClassNotFoundException If the class for an object being restored cannot be found.
IOException

public boolean remoteEquals (RemoteRef ref)

default implementation of equals for remote objects

Parameters
ref the Object to compare with
Returns
  • true if these Objects are equal; false otherwise.

public int remoteHashCode ()

default implementation of hashCode for remote objects

Returns
  • remote object hashcode

public String remoteToString ()

Method from object, forward from RemoteObject

Returns
  • string representing remote object reference

public void writeExternal (ObjectOutput out)

Write out external representation for remote ref.

Parameters
out the stream to write the object to
Throws
IOException