Save This Page
Home » spring-framework-2.5.6-with-dependencies » org.springframework » remoting » support » [javadoc | source]
org.springframework.remoting.support
public class: RemoteInvocation [javadoc | source]
java.lang.Object
   org.springframework.remoting.support.RemoteInvocation

All Implemented Interfaces:
    Serializable

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.

Constructor:
 public RemoteInvocation() 
 public RemoteInvocation(MethodInvocation methodInvocation) 
    Create a new RemoteInvocation for the given AOP method invocation.
    Parameters:
    methodInvocation - the AOP invocation to convert
 public RemoteInvocation(String methodName,
    Class[] parameterTypes,
    Object[] arguments) 
    Create a new RemoteInvocation for the given parameters.
    Parameters:
    methodName - the name of the method to invoke
    parameterTypes - the parameter types of the method
    arguments - the arguments for the invocation
Method from org.springframework.remoting.support.RemoteInvocation Summary:
addAttribute,   getArguments,   getAttribute,   getAttributes,   getMethodName,   getParameterTypes,   invoke,   setArguments,   setAttributes,   setMethodName,   setParameterTypes,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.remoting.support.RemoteInvocation Detail:
 public  void addAttribute(String key,
    Serializable value) throws IllegalStateException 
    Add an additional invocation attribute. Useful to add additional invocation context without having to subclass RemoteInvocation.

    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.

 public Object[] getArguments() 
    Return the arguments for the target method call.
 public Serializable getAttribute(String key) 
    Retrieve the attribute for the given key, if any.

    The implementation avoids to unnecessarily create the attributes Map, to minimize serialization size.

 public Map getAttributes() 
 public String getMethodName() 
    Return the name of the target method.
 public Class[] getParameterTypes() 
    Return the parameter types of the target method.
 public Object invoke(Object targetObject) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException 
    Perform this invocation on the given target object. Typically called when a RemoteInvocation is received on the server.
 public  void setArguments(Object[] arguments) 
    Set the arguments for the target method call.
 public  void setAttributes(Map attributes) 
 public  void setMethodName(String methodName) 
    Set the name of the target method.
 public  void setParameterTypes(Class[] parameterTypes) 
    Set the parameter types of the target method.
 public String toString()