|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aop.joinpoint.InvocationBase
org.jboss.aop.joinpoint.MethodInvocation
org.jboss.aop.joinpoint.MethodInvocationWrapper
public class MethodInvocationWrapper
This wrapper class allows you to insert a chain of interceptors into the middle of a call stack.
| Field Summary |
|---|
| Fields inherited from class org.jboss.aop.joinpoint.MethodInvocation |
|---|
advisedMethod, arguments, marshalledArguments, methodHash, unadvisedMethod |
| Fields inherited from class org.jboss.aop.joinpoint.InvocationBase |
|---|
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject |
| Constructor Summary | |
|---|---|
MethodInvocationWrapper(MethodInvocation wrapped,
Interceptor[] interceptors)
|
|
| Method Summary | |
|---|---|
void |
addResponseAttachment(Object key,
Object val)
|
Invocation |
copy()
Copies complete state of Invocation object. |
Method |
getActualMethod()
|
Advisor |
getAdvisor()
|
Object[] |
getArguments()
Returns a non-null array containing all method arguments. |
MetaDataResolver |
getInstanceResolver()
|
SimpleMetaData |
getMetaData()
Return all the contextual data attached to this invocation |
Object |
getMetaData(Object group,
Object attr)
This method resolves metadata based on the context of the invocation. |
Method |
getMethod()
|
long |
getMethodHash()
|
Object |
getResponseAttachment(Object key)
|
Map<Object,Object> |
getResponseContextInfo()
|
Object |
getTargetObject()
|
Object |
invokeNext()
Invoke on the next interceptor in the chain. |
void |
setArguments(Object[] args)
Replaces method argument values by the ones contained in
arguments. |
void |
setMetaData(SimpleMetaData data)
Set all the contextual data attached to this invocation |
void |
setResponseContextInfo(Map<Object,Object> responseContextInfo)
|
void |
setTargetObject(Object targetObject)
|
| Methods inherited from class org.jboss.aop.joinpoint.MethodInvocation |
|---|
getWrapper, handleErrors, invokeTarget, readExternal, resolveAnnotation, resolveAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, toString, writeExternal |
| Methods inherited from class org.jboss.aop.joinpoint.InvocationBase |
|---|
getCurrentInterceptor, getInterceptors, invokeNext, resolveClassAnnotation, resolveClassMetaData, resolveTypedClassAnnotation, setAdvisor, setInstanceResolver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MethodInvocationWrapper(MethodInvocation wrapped,
Interceptor[] interceptors)
| Method Detail |
|---|
public Object getMetaData(Object group,
Object attr)
MethodInvocation
getMetaData in interface InvocationgetMetaData in class MethodInvocation
public Object invokeNext()
throws Throwable
MethodInvocation
invokeNext in interface InvocationinvokeNext in class MethodInvocationThrowablepublic MetaDataResolver getInstanceResolver()
getInstanceResolver in class InvocationBasepublic Object[] getArguments()
MethodInvocation
The returned array can be changed by the advice or interceptor accordingly. All
changes are reflected on joinpoint execution, and are noticed as well by
other advices and interceptors that are executed after the current one.
However, changes to this array are limited to the scope of current advice
execution, and must be performed before execution of MethodInvocation.invokeNext(),
InvocationBase.invokeNext(Interceptor[]), or MethodInvocation.invokeTarget() method.
Otherwise, inconsistency on joinpoint argument values may be noticed.
getArguments in class MethodInvocationpublic void setArguments(Object[] args)
MethodInvocation
arguments.
Advices and interceptors must be aware that, for performance reasons,
this array does not get copied across; its reference is directly used instead.
Hence, changes to arguments array after this method being called
are forbidden. Otherwise, inconsistency on joinpoint argument values may be
noticed.
setArguments in class MethodInvocationargs - a non-null array containing the new values of method arguments.
The size of this array must be the same as the one of
MethodInvocation.getArguments(), as well as the element types.public Object getTargetObject()
getTargetObject in interface InvocationgetTargetObject in class InvocationBasepublic Invocation copy()
MethodInvocation
copy in interface Invocationcopy in class MethodInvocationpublic Method getMethod()
getMethod in class MethodInvocationpublic Method getActualMethod()
getActualMethod in class MethodInvocationpublic long getMethodHash()
getMethodHash in class MethodInvocationpublic Advisor getAdvisor()
getAdvisor in interface InvocationgetAdvisor in class MethodInvocationpublic Map<Object,Object> getResponseContextInfo()
getResponseContextInfo in interface InvocationgetResponseContextInfo in class InvocationBasepublic void setResponseContextInfo(Map<Object,Object> responseContextInfo)
setResponseContextInfo in interface InvocationsetResponseContextInfo in class InvocationBasepublic Object getResponseAttachment(Object key)
getResponseAttachment in interface InvocationgetResponseAttachment in class InvocationBase
public void addResponseAttachment(Object key,
Object val)
addResponseAttachment in interface InvocationaddResponseAttachment in class InvocationBasepublic SimpleMetaData getMetaData()
InvocationBase
getMetaData in interface InvocationgetMetaData in class InvocationBasepublic void setMetaData(SimpleMetaData data)
InvocationBase
setMetaData in interface InvocationsetMetaData in class InvocationBasepublic void setTargetObject(Object targetObject)
setTargetObject in interface InvocationsetTargetObject in class InvocationBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||