org.codehaus.aspectwerkz.transform.inlining.deployer
Class Deployer

java.lang.Object
  extended by org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer

public class Deployer
extends Object

Manages deployment and undeployment of aspects. Aspects can be deployed and undeployed into a running system(s).

Supports annotation defined and XML defined aspects.

Author:
Jonas BonŽr

Constructor Summary
Deployer()
           
 
Method Summary
static DeploymentHandle deploy(Class aspect)
          Deploys an annotation defined aspect.
static DeploymentHandle deploy(Class aspect, ClassLoader deployLoader)
          Deploys an annotation defined aspect.
static DeploymentHandle deploy(Class aspect, DeploymentScope deploymentScope)
          Deploys an annotation defined aspect in the scope defined by the prepared pointcut.
static DeploymentHandle deploy(Class aspect, DeploymentScope deploymentScope, ClassLoader deployLoader)
          TODO allow deployment in other systems than virtual system?
static DeploymentHandle deploy(Class aspect, String xmlDef)
          Deploys an XML defined aspect in the scope defined by the prepared pointcut.
static DeploymentHandle deploy(Class aspect, String xmlDef, ClassLoader deployLoader)
          Deploys an XML defined aspect in the scope defined by the prepared pointcut.
static DeploymentHandle deploy(Class aspect, String xmlDef, DeploymentScope deploymentScope)
          Deploys an XML defined aspect in the scope defined by the prepared pointcut.
static DeploymentHandle deploy(Class aspect, String xmlDef, DeploymentScope deploymentScope, ClassLoader deployLoader)
          TODO allow deployment in other systems than virtual system?
static DeploymentHandle deploy(String aspectClassName)
          Deploys an annotation defined aspect.
static DeploymentHandle deploy(String aspectClassName, ClassLoader deployLoader)
          Deploys an annotation defined aspect.
static DeploymentHandle deploy(String aspectClassName, DeploymentScope deploymentScope)
          Deploys an annotation defined aspect in the scope defined by the prepared pointcut.
static DeploymentHandle deploy(String className, DeploymentScope deploymentScope, ClassLoader deployLoader)
          Deploys an annotation defined aspect in the scope defined by the prepared pointcut.
static void undeploy(Class aspect)
          Undeploys an aspect from the same loader that has loaded the class.
static void undeploy(Class aspect, ClassLoader loader)
          Undeploys an aspect from a specific class loader.
static void undeploy(DeploymentHandle deploymentHandle)
          Undeploys an aspect in the same way that it has been deployed in in the previous deploy event defined by the deployment handle.
static void undeploy(String className, ClassLoader loader)
          Undeploys an aspect from a specific class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Deployer

public Deployer()
Method Detail

deploy

public static DeploymentHandle deploy(Class aspect)
Deploys an annotation defined aspect.

Deploys the aspect in all systems in the class loader that has loaded the aspect class.

CAUTION: use a to own risk, the aspect might have a wider scope than your set of instrumented join points, then the aspect will not be applied to all intended points, to play safe - use deploy(final Class aspect, final DeploymentScope deploymentScope)

Parameters:
aspect - the aspect class
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(String aspectClassName)
Deploys an annotation defined aspect.

Deploys the aspect in all systems in the class loader that has loaded the aspect class.

CAUTION: use a to own risk, the aspect might have a wider scope than your set of instrumented join points, then the aspect will not be applied to all intended points, to play safe - use deploy(final Class aspect, final DeploymentScope preparedPointcut)

Parameters:
aspectClassName - the aspect class name
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(Class aspect,
                                      ClassLoader deployLoader)
Deploys an annotation defined aspect.

Deploys the aspect in all systems in the class loader that is specified.

CAUTION: use a to own risk, the aspect might have a wider scope than your set of instrumented join points, then the aspect will not be applied to all intended points, to play safe - use deploy(final Class aspect, final DeploymentScope preparedPointcut)

Parameters:
aspect - the aspect class
deployLoader -
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(String aspectClassName,
                                      ClassLoader deployLoader)
Deploys an annotation defined aspect.

Deploys the aspect in all systems in the class loader that is specified.

CAUTION: use a to own risk, the aspect might have a wider scope than your set of instrumented join points, then the aspect will not be applied to all intended points, to play safe - use deploy(final Class aspect, final DeploymentScope preparedPointcut)

Parameters:
aspectClassName - the aspect class name
deployLoader -
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(Class aspect,
                                      DeploymentScope deploymentScope)
Deploys an annotation defined aspect in the scope defined by the prepared pointcut.

Deploys the aspect in all systems in the class loader that has loaded the aspect class.

Parameters:
aspect - the aspect class
deploymentScope -
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(String aspectClassName,
                                      DeploymentScope deploymentScope)
Deploys an annotation defined aspect in the scope defined by the prepared pointcut.

Deploys the aspect in all systems in the class loader that has loaded the aspect class.

Parameters:
aspectClassName - the aspect class name
deploymentScope -
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(Class aspect,
                                      DeploymentScope deploymentScope,
                                      ClassLoader deployLoader)
TODO allow deployment in other systems than virtual system?

Deploys an annotation defined aspect in the scope defined by the prepared pointcut.

Deploys the aspect in the class loader that is specified.

Parameters:
aspect - the aspect class
deployLoader - the loader to deploy the aspect in
deploymentScope - the prepared pointcut
Returns:
a unique deployment handle for this deployment

deploy

public static DeploymentHandle deploy(String className,
                                      DeploymentScope deploymentScope,
                                      ClassLoader deployLoader)
Deploys an annotation defined aspect in the scope defined by the prepared pointcut.

Deploys the aspect in the class loader that is specified.

Parameters:
className -
deploymentScope -
deployLoader -
Returns:

deploy

public static DeploymentHandle deploy(Class aspect,
                                      String xmlDef)
Deploys an XML defined aspect in the scope defined by the prepared pointcut.

If the aspect class has annotations, those will be read but the XML definition will override the annotation definition.

Deploys the aspect in the class loader that has loaded the aspect.

Parameters:
aspect - the aspect class
xmlDef -
Returns:

deploy

public static DeploymentHandle deploy(Class aspect,
                                      String xmlDef,
                                      DeploymentScope deploymentScope)
Deploys an XML defined aspect in the scope defined by the prepared pointcut.

If the aspect class has annotations, those will be read but the XML definition will override the annotation definition.

Deploys the aspect in the class loader that has loaded the aspect.

Parameters:
aspect - the aspect class
xmlDef -
deploymentScope -
Returns:

deploy

public static DeploymentHandle deploy(Class aspect,
                                      String xmlDef,
                                      ClassLoader deployLoader)
Deploys an XML defined aspect in the scope defined by the prepared pointcut.

If the aspect class has annotations, those will be read but the XML definition will override the annotation definition.

Deploys the aspect in the class loader that is specified.

Parameters:
aspect - the aspect class
xmlDef -
deployLoader -
Returns:

deploy

public static DeploymentHandle deploy(Class aspect,
                                      String xmlDef,
                                      DeploymentScope deploymentScope,
                                      ClassLoader deployLoader)
TODO allow deployment in other systems than virtual system?

Deploys an XML defined aspect in the scope defined by the prepared pointcut.

If the aspect class has annotations, those will be read but the XML definition will override the annotation definition.

Deploys the aspect in the class loader that is specified.

Parameters:
aspect - the aspect class
deploymentScope -
xmlDef -
deployLoader -
Returns:

undeploy

public static void undeploy(Class aspect)
Undeploys an aspect from the same loader that has loaded the class.

Parameters:
aspect - the aspect class

undeploy

public static void undeploy(Class aspect,
                            ClassLoader loader)
Undeploys an aspect from a specific class loader.

Parameters:
aspect - the aspect class
loader - the loader that you want to undeploy the aspect from

undeploy

public static void undeploy(String className,
                            ClassLoader loader)
Undeploys an aspect from a specific class loader.

Parameters:
className - the aspect class name
loader - the loader that you want to undeploy the aspect from

undeploy

public static void undeploy(DeploymentHandle deploymentHandle)
Undeploys an aspect in the same way that it has been deployed in in the previous deploy event defined by the deployment handle.

Parameters:
deploymentHandle - the handle to the previous deployment event


Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.