org.objectweb.jeremie.stub_factories.std
Class StdStub

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteStub
          extended by org.objectweb.jeremie.stub_factories.std.StdStub
All Implemented Interfaces:
Serializable, Remote
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

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
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.
 
Methods inherited from class java.rmi.server.RemoteStub
setRef
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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.