Interface org.as2lib.aop.advice.AroundAdvice

org.as2lib.core.BasicInterface
   +--org.as2lib.aop.Advice
      +--org.as2lib.aop.advice.AroundAdvice

Description

AroundAdvice is invoked instead of a join point. The special thing about the around advice is that it can nevertheless proceed the join point if it likes to and can also change the arguments to use for the procession and alter the return type if wished. This means with the around advice you can change contextual information of the join point it is woven into.

Method Index

execute()

Inherited from Advice

captures(), getProxy()

Inherited from BasicInterface

toString()

Method Detail

execute

public function execute(joinPoint:JoinPoint, args:Array)

Executes the actions to perform instead of the given joinPoint. If the joinPoint shall nevertheless be executed this has to be done manually by invoking the JoinPoint.proceed method.

The implementation of this method decides whether the actual join point is bypassed or if it is executed. It can also be decided what arguments to use for the procession and what to do with the response of the procession be it a return value or an exception. This means you can alter the context as you please.

If you use the proxy returned by the AbstractAroundAdvice#getProxy method to overwrite the actual join point, this method is executed instead of the join point and the result of this method is returned to the invoker of the join point.

Parameters

joinPointthe join point this advice was woven into
argsthe arguments passed to the join point

Return

the result of the execution