JBoss.org Community Documentation
JBoss AOP provides JoinPoint Beans, so that an advice can access all information regarding a joinpoint during
its execution. This information consists of context values, explained in the next subsection, and of reflection
objects (java.lang.reflection
). The reflection objects describe the joinpoint being intercepted
like a java.lang.Method
for a method execution joinpoint).
There are two groups of beans. The first one is the Invocation
beans group. All classes of this group are
subclasses of org.jboss.aop.joinpoint.Invocation
. The Invocation
class was presented in
Chapter 2 as a runtime encapsulation of a joinpoint. An Invocation
object also contains
an interceptor chain, where all advices and interceptors that intercept the joinpoint are stored. Invocation beans provide
the invokeNext()
method, responsible for proceeding execution to the next advice in the interceptor chain
(if there is an advice that has not started execution yet) or to the joinpoint itself (if all advices contained in the interceptor
chain have already started running). We will see more on this in the next chapter.
The other group of beans contains only information regarding the joinpoint itself, and are called the
JoinPointBean
group. All beans of this group are defined in interfaces, with
org.jboss.joinpoint.JoinPointBean
being their common superinterface.
The Invocation
objects are available only to around advices. All other types of advices can use the
JoinPointBean
types to access joinpoint specific data.
In both groups there is a specific type for each joinpoint type. The type of bean corresponding to each joinpoint type can be seen
in Table 3.1, “
Joinpoint Types Table
”. All beans are in the package org.jboss.aop.joinpoint
.