org.objectweb.jac.aspects.distribution
Class DeploymentWrapper

java.lang.Object
  extended byorg.objectweb.jac.core.Wrapper
      extended byorg.objectweb.jac.aspects.distribution.DeploymentWrapper
All Implemented Interfaces:
Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable

public class DeploymentWrapper
extends Wrapper

This wrapper wraps constructors in order to deploy the objects on remote host(s) after their initialization.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac, cr
 
Constructor Summary
DeploymentWrapper(AspectComponent ac, String hostExpr, Boolean state)
          The constructor.
 
Method Summary
 Object construct(ConstructorInvocation invocation)
           
 Object deploy(Interaction i)
          Actually performs the deployment on a constructor interaction.
 Object invoke(MethodInvocation invocation)
           
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeploymentWrapper

public DeploymentWrapper(AspectComponent ac,
                         String hostExpr,
                         Boolean state)
The constructor.

Parameters:
ac - the aspect component that owns this wrapper
hostExpr - a regular expression that gives the host where the wrapped object should be deployed
state - a flag that tells if the state of the deployed object should be copied on the remote host(s) or not
Method Detail

invoke

public Object invoke(MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface MethodInterceptor
Overrides:
invoke in class Wrapper
Throws:
Throwable

construct

public Object construct(ConstructorInvocation invocation)
                 throws Throwable
Specified by:
construct in interface ConstructorInterceptor
Overrides:
construct in class Wrapper
Throws:
Throwable

deploy

public Object deploy(Interaction i)
Actually performs the deployment on a constructor interaction.