org.objectweb.jeremie.stub_factories.std

Class StdStub

Known Direct Subclasses:
OptStub

public class StdStub
extends RemoteStub

Provides an implementation of a standard Jeremie stub.

A stub contains a reference to a target remote object that it represents. Reference chains may of course exist whereby a stub contains a reference to another stub, etc.

Constructor Summary

StdStub()
Creates a standard Jeremie stub.
StdStub(RemoteRef ref)
Creates a standard Jeremie stub with the given remote object reference.

Method Summary

protected Object
readResolve()
Attempts to bind at least one of the identifiers in this stub's reference to obtain an object giving access to the referenced object.
void
setRef(RemoteRef ref)
Sets the reference of this stub to the given reference.

Constructor Details

StdStub

protected StdStub()
Creates a standard Jeremie stub.


StdStub

public StdStub(RemoteRef ref)
Creates a standard Jeremie stub with the given remote object reference.

Parameters:
ref - a reference to a remote object.

Method Details

readResolve

protected final Object readResolve()
            throws IOException
Attempts to bind at least one of the identifiers in this stub's reference to obtain an object giving access to the referenced object. The returned object need not be a remote object.

Returns:
an object giving access to the target object referenced by this stub.


setRef

public final void setRef(RemoteRef ref)
Sets the reference of this stub to the given reference.

Parameters:
ref - a reference to a remote object.