|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.support.RemoteInvocation
public class 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.
RemoteInvocationResult
,
RemoteInvocationFactory
,
RemoteInvocationExecutor
,
RmiProxyFactoryBean
,
RmiServiceExporter
,
HttpInvokerProxyFactoryBean
,
HttpInvokerServiceExporter
,
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()
Return the arguments for the target method call. |
Serializable |
getAttribute(String key)
Retrieve the attribute for the given key, if any. |
Map |
getAttributes()
Return the attributes Map. |
String |
getMethodName()
Return the name of the target method. |
Class[] |
getParameterTypes()
Return the parameter types of the target method. |
Object |
invoke(Object targetObject)
Perform this invocation on the given target object. |
void |
setArguments(Object[] arguments)
Set the arguments for the target method call. |
void |
setAttributes(Map attributes)
Set the attributes Map. |
void |
setMethodName(String methodName)
Set the name of the target method. |
void |
setParameterTypes(Class[] parameterTypes)
Set the parameter types of the target method. |
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) throws IllegalStateException
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 value
IllegalStateException
- if the key is already boundpublic Serializable getAttribute(String key)
The implementation avoids to unnecessarily create the attributes Map, to minimize serialization size.
key
- the attribute key
null
if not definedpublic void setAttributes(Map attributes)
addAttribute(java.lang.String, java.io.Serializable)
and getAttribute(java.lang.String)
.
attributes
- the attributes MapaddAttribute(java.lang.String, java.io.Serializable)
,
getAttribute(java.lang.String)
public Map getAttributes()
addAttribute(java.lang.String, java.io.Serializable)
and getAttribute(java.lang.String)
.
null
if none createdaddAttribute(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()
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |