org.codehaus.aspectwerkz.xmldef.advice
Class AroundAdvice

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

public abstract class AroundAdvice
extends AbstractAdvice

Executes around or instead of the original method invocation.

Supports four different deployment models: PER_JVM PER_CLASS PER_INSTANCE 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:
Serialized Form

Constructor Summary
AroundAdvice()
          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.

Callback method for the framework.

abstract  java.lang.Object execute(JoinPoint joinPoint)
          Executes by invoking the next around advice.
 
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

AroundAdvice

public AroundAdvice()
Sets the class of the class.

Method Detail

execute

public abstract java.lang.Object execute(JoinPoint joinPoint)
                                  throws java.lang.Throwable
Executes by invoking the next around advice. User should subclass A override this method to add specific behaviour around the invocation. To be implemented by the user.

Parameters:
joinPoint - the join point specified
Returns:
the result from the method invocation
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.