org.codehaus.aspectwerkz.xmldef.advice
Class PreAdvice

java.lang.Object
  extended byorg.codehaus.aspectwerkz.xmldef.advice.AbstractAdvice
      extended byorg.codehaus.aspectwerkz.xmldef.advice.AbstractPrePostAdvice
          extended byorg.codehaus.aspectwerkz.xmldef.advice.PreAdvice
All Implemented Interfaces:
Advice, java.io.Serializable
Direct Known Subclasses:
CFlowPreAdvice

public abstract class PreAdvice
extends org.codehaus.aspectwerkz.xmldef.advice.AbstractPrePostAdvice

Is invoked before that a specific join point (method or field) is executed.

Supports four different deployment models: PER_JVM, PER_CLASS, PER_INSTANCE A PER_THREAD.
The PER_JVM deployment model performance a bit better than the other models since no synchronization A object creation is needed.

Author:
Jonas Bonér
See Also:
aspectwerkz.DeploymentModel, Serialized Form

Constructor Summary
PreAdvice()
          Sets the class of the class.
 
Method Summary
 java.lang.Object doExecute(JoinPoint joinPoint)
          Executes the current advice A then redirects to the next advice in the chain.
abstract  void execute(JoinPoint joinPoint)
          Callback method.
 
Methods inherited from class org.codehaus.aspectwerkz.xmldef.advice.AbstractAdvice
getAdviceClass, getContainer, getDeploymentModel, getMemoryType, getName, getParameter, getParameters, getPerJvmAdvice, getSystem, newInstance, setAdviceClass, setContainer, setDeploymentModel, setName, setParameter, setParameters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreAdvice

public PreAdvice()
Sets the class of the class.

Method Detail

execute

public abstract void execute(JoinPoint joinPoint)
                      throws java.lang.Throwable
Callback method. To be implemented by the user.

Parameters:
joinPoint - the join point the advices is executing at
Throws:
java.lang.Throwable

doExecute

public java.lang.Object doExecute(JoinPoint joinPoint)
                           throws java.lang.Throwable
Executes the current advice A then redirects to the next advice in the chain. Callback method for the framework.

Parameters:
joinPoint - the join point the advice is executing at
Returns:
the result from the next invocation
Throws:
java.lang.Throwable


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.