Monday, July 23, 2012
can you list some Advice types in AOP?
■ Before returning—An advice that’s executed before the target object’s method execution
starts. An advice that’s invoked before the execution of the target object’s method is called a before
advice
■ After returning—An advice that’s executed after the target object’s method execution
is complete, without exceptions. An after-returning advice is specified
with the @AfterReturning annotation.
■ After throwing—An advice that’s executed when the target object’s method
throws an exception. An after-throwing advice is specified with the @After-
Throwing annotation.
■ After—An advice that’s executed after the target object’s method returns normally
or it exits abruptly due to an exception. An after advice is specified using
the @After annotation.
■ Around—An advice that’s executed before and after the target object’s method
is executed. An around advice is specified using the @Around annotation.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment