|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.support.RemoteInvocation
Encapsulates a remote invocation, providing core method invocation properties in a serializable fashion. Used for RMI and HTTP-based serialization invokers.
This is an SPI class, typically not used directly by applications. Can be subclassed for additional invocation parameters.
RemoteInvocationFactory
,
RemoteInvocationExecutor
,
Serialized FormConstructor Summary | |
RemoteInvocation()
Create a new RemoteInvocation for use as JavaBean. |
|
RemoteInvocation(MethodInvocation methodInvocation)
Create a new RemoteInvocation for the given AOP method invocation. |
|
RemoteInvocation(String methodName,
Class[] parameterTypes,
Object[] arguments)
Create a new RemoteInvocation for the given parameters. |
Method Summary | |
void |
addAttribute(String key,
Serializable value)
Add an additional invocation attribute. |
Object[] |
getArguments()
|
Serializable |
getAttribute(String key)
Retrieve the attribute for the given key, if any. |
Map |
getAttributes()
Return the attributes Map. |
String |
getMethodName()
|
Class[] |
getParameterTypes()
|
Object |
invoke(Object targetObject)
Perform this invocation on the given target object. |
void |
setArguments(Object[] arguments)
|
void |
setAttributes(Map attributes)
Set the attributes Map. |
void |
setMethodName(String methodName)
|
void |
setParameterTypes(Class[] parameterTypes)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RemoteInvocation()
public RemoteInvocation(String methodName, Class[] parameterTypes, Object[] arguments)
methodName
- the name of the method to invokeparameterTypes
- the parameter types of the methodarguments
- the arguments for the invocationpublic RemoteInvocation(MethodInvocation methodInvocation)
methodInvocation
- the AOP invocation to convertMethod Detail |
public void setMethodName(String methodName)
public String getMethodName()
public void setParameterTypes(Class[] parameterTypes)
public Class[] getParameterTypes()
public void setArguments(Object[] arguments)
public Object[] getArguments()
public void addAttribute(String key, Serializable value)
Attribute keys have to be unique, and no overriding of existing attributes is allowed.
The implementation avoids to unnecessarily create the attributes Map, to minimize serialization size.
key
- the attribute keyvalue
- the attribute valuepublic Serializable getAttribute(String key)
The implementation avoids to unnecessarily create the attributes Map, to minimize serialization size.
key
- the attribute key
public void setAttributes(Map attributes)
attributes
- the attributes MapaddAttribute(java.lang.String, java.io.Serializable)
,
getAttribute(java.lang.String)
public Map getAttributes()
addAttribute(java.lang.String, java.io.Serializable)
,
getAttribute(java.lang.String)
public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
targetObject
- the target object to apply the invocation to
NoSuchMethodException
- if the method name could not be resolved
IllegalAccessException
- if the method could not be accessed
InvocationTargetException
- if the method invocation resulted in an exceptionMethod.invoke(java.lang.Object, java.lang.Object[])
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |