org.codehaus.aspectwerkz.xmldef.advice
Class ThrowsAdvice

java.lang.Object
  extended byorg.codehaus.aspectwerkz.xmldef.advice.AbstractAdvice
      extended byorg.codehaus.aspectwerkz.xmldef.advice.ThrowsAdvice
All Implemented Interfaces:
Advice, java.io.Serializable

public abstract class ThrowsAdvice
extends AbstractAdvice

Is invoked at the join points where a specific exception is thrown out of a method.

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:
Serialized Form

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

ThrowsAdvice

public ThrowsAdvice()
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 advice 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 currently executing at
Returns:
the result from the next invocation
Throws:
java.lang.Throwable


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