org.as2lib.core.BasicClass +--org.as2lib.aop.advice.SimpleAdviceFactory
AdviceFactory
SimpleAdviceFactory
creates advices dynamically based on an advice class.
public function SimpleAdviceFactory(adviceClass:Function)
Constructs a new SimpleAdviceFactory
instance.
The adviceClass
is suspected to have a constructor that takes two
arguments. The first argument is either a pointcut pattern or a Pointcut
instance and the second argument is a callback of instance Call.
IllegalArgumentException | if argument adviceClass is null
or undefined
|
IllegalArgumentException | if the passed-in adviceClass is not an
implementation of the Advice interface
|
public function getAdviceByStringAndCall(pointcut:String, callback:Call):Advice
Returns an advice configured for the given pointcut
string and
callback
.
pointcut | the string representation of a pointcut used by the returned advice |
callback | the callback that is executed if you invoke the execute
method on the returned advice
|
an advice that is configured with the given pointcut
and
callback
getAdviceByStringAndCall() in org.as2lib.aop.advice.AdviceFactory
public function getAdviceByPointcutAndCall(pointcut:Pointcut, callback:Call):Advice
Returns an advice configured for the given pointcut
and callback
.
pointcut | the pointcut used by the returned advice |
callback | the callback that is executed if you invoke the execute
method on the returned advice
|
an advice that is configured with the given pointcut
and
callback
getAdviceByPointcutAndCall() in org.as2lib.aop.advice.AdviceFactory