org.objectweb.jeremie.stub_factories.std
Class StdStub
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteStub
org.objectweb.jeremie.stub_factories.std.StdStub
- All Implemented Interfaces:
- Remote, Serializable
- Direct Known 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.
- See Also:
- Serialized Form
Constructor Summary |
protected |
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. |
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.
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.
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.
- Throws:
IOException
- if something goes wrong.