JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.core.dist
Class StubWrapper

java.lang.Object
  |
  +--org.objectweb.jac.core.Wrapper
        |
        +--org.objectweb.jac.core.dist.StubWrapper
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NonBlockingStubWrapper

public class StubWrapper
extends Wrapper

StubWrapper is a dynamic client stub for org.objectweb.jac. Every method called on an object wrapped by such a wrapper is forwarded to a remote reference. The call is blocking. For non-blocking calls see NonBlockingStubWrapper. This a wrapper class. The invoke method wraps all the methods of a wrappee.

Author:
Lionel Seinturier
See Also:
NonBlockingStubWrapper, Serialized Form

Field Summary
protected  RemoteRef remoteRef
          The remote reference attached to this stub
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac
 
Constructor Summary
StubWrapper(AspectComponent ac, RemoteRef remoteRef)
          Construct a new dynamic stub.
StubWrapper(AspectComponent ac, String serverContainer)
          A more user-friendly constructor.
 
Method Summary
 RemoteRef getRemoteRef()
          The getter method for the remoteRef field.
 Object invoke(Interaction interaction)
          Forward a call to the remote reference.
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

remoteRef

protected RemoteRef remoteRef
The remote reference attached to this stub

Constructor Detail

StubWrapper

public StubWrapper(AspectComponent ac,
                   RemoteRef remoteRef)
Construct a new dynamic stub.

Parameters:
remoteRef - the remote reference associated to the stub

StubWrapper

public StubWrapper(AspectComponent ac,
                   String serverContainer)
A more user-friendly constructor.

Parameters:
serverContainer - the name of the container where the server is deployed (can be a regular expression)
Method Detail

getRemoteRef

public RemoteRef getRemoteRef()
The getter method for the remoteRef field.

Returns:
the remoteRef field

invoke

public Object invoke(Interaction interaction)
Forward a call to the remote reference.


Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli