Spring Framework

org.springframework.aop
Interface ProxyMethodInvocation

All Superinterfaces:
org.aopalliance.intercept.Invocation, org.aopalliance.intercept.Joinpoint, org.aopalliance.intercept.MethodInvocation
All Known Implementing Classes:
ReflectiveMethodInvocation

public interface ProxyMethodInvocation
extends org.aopalliance.intercept.MethodInvocation

Extension of the AOP Alliance MethodInvocation interface, allowing access to the proxy that the method invocation was made through.

Useful to be able to substitute return values with the proxy, if necessary, for example if the invocation target returned itself.

Since:
1.1.3
Author:
Juergen Hoeller, Adrian Colyer
See Also:
ReflectiveMethodInvocation, DelegatingIntroductionInterceptor

Method Summary
 java.lang.Object getProxy()
          Return the proxy that this method invocation was made through.
 java.lang.Object getUserAttribute(java.lang.String key)
          Return the value of the specified user attribute.
 org.aopalliance.intercept.MethodInvocation invocableClone()
          Create a clone of this object.
 org.aopalliance.intercept.MethodInvocation invocableClone(java.lang.Object[] arguments)
          Create a clone of this object.
 void setArguments(java.lang.Object[] arguments)
          Set the arguments to be used on subsequent invocations in the any advice in this chain.
 void setUserAttribute(java.lang.String key, java.lang.Object value)
          Add the specified user attribute with the given value to this invocation.
 
Methods inherited from interface org.aopalliance.intercept.MethodInvocation
getMethod
 
Methods inherited from interface org.aopalliance.intercept.Invocation
getArguments
 
Methods inherited from interface org.aopalliance.intercept.Joinpoint
getStaticPart, getThis, proceed
 

Method Detail

getProxy

java.lang.Object getProxy()
Return the proxy that this method invocation was made through.

Returns:
the original proxy object

invocableClone

org.aopalliance.intercept.MethodInvocation invocableClone()
Create a clone of this object. If cloning is done before proceed() is invoked on this object, proceed() can be invoked once per clone to invoke the joinpoint (and the rest of the advice chain) more than once.

Returns:
an invocable clone of this invocation. proceed() can be called once per clone.

invocableClone

org.aopalliance.intercept.MethodInvocation invocableClone(java.lang.Object[] arguments)
Create a clone of this object. If cloning is done before proceed() is invoked on this object, proceed() can be invoked once per clone to invoke the joinpoint (and the rest of the advice chain) more than once.

Parameters:
arguments - the arguments that the cloned invocation is supposed to use, overriding the original arguments
Returns:
an invocable clone of this invocation. proceed() can be called once per clone.

setArguments

void setArguments(java.lang.Object[] arguments)
Set the arguments to be used on subsequent invocations in the any advice in this chain.

Parameters:
arguments - the argument array

setUserAttribute

void setUserAttribute(java.lang.String key,
                      java.lang.Object value)
Add the specified user attribute with the given value to this invocation.

Such attributes are not used within the AOP framework itself. They are just kept as part of the invocation object, for use in special interceptors.

Parameters:
key - the name of the attribute
value - the value of the attribute, or null to reset it

getUserAttribute

java.lang.Object getUserAttribute(java.lang.String key)
Return the value of the specified user attribute.

Parameters:
key - the name of the attribute
Returns:
the value of the attribute, or null if not set
See Also:
setUserAttribute(java.lang.String, java.lang.Object)

Spring Framework