org.springframework.remoting.support
Class RemoteInvocation

java.lang.Object
  extended byorg.springframework.remoting.support.RemoteInvocation
All Implemented Interfaces:
java.io.Serializable

public class RemoteInvocation
extends java.lang.Object
implements java.io.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.

Since:
25.02.2004
Author:
Juergen Hoeller
See Also:
RemoteInvocationFactory, RemoteInvocationExecutor, Serialized Form

Constructor Summary
RemoteInvocation()
          Create a new RemoteInvocation for use as JavaBean.
RemoteInvocation(org.aopalliance.intercept.MethodInvocation methodInvocation)
          Create a new RemoteInvocation for the given AOP method invocation.
RemoteInvocation(java.lang.String methodName, java.lang.Class[] parameterTypes, java.lang.Object[] arguments)
          Create a new RemoteInvocation for the given parameters.
 
Method Summary
 java.lang.Object[] getArguments()
           
 java.lang.String getMethodName()
           
 java.lang.Class[] getParameterTypes()
           
 java.lang.Object invoke(java.lang.Object targetObject)
          Perform this invocation on the given target object.
 void setArguments(java.lang.Object[] arguments)
           
 void setMethodName(java.lang.String methodName)
           
 void setParameterTypes(java.lang.Class[] parameterTypes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteInvocation

public RemoteInvocation()
Create a new RemoteInvocation for use as JavaBean.


RemoteInvocation

public RemoteInvocation(java.lang.String methodName,
                        java.lang.Class[] parameterTypes,
                        java.lang.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

RemoteInvocation

public RemoteInvocation(org.aopalliance.intercept.MethodInvocation methodInvocation)
Create a new RemoteInvocation for the given AOP method invocation.

Parameters:
methodInvocation - the AOP invocation to convert
Method Detail

setMethodName

public void setMethodName(java.lang.String methodName)

getMethodName

public java.lang.String getMethodName()

setParameterTypes

public void setParameterTypes(java.lang.Class[] parameterTypes)

getParameterTypes

public java.lang.Class[] getParameterTypes()

setArguments

public void setArguments(java.lang.Object[] arguments)

getArguments

public java.lang.Object[] getArguments()

invoke

public java.lang.Object invoke(java.lang.Object targetObject)
                        throws java.lang.NoSuchMethodException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
Perform this invocation on the given target object. Typically called when a RemoteInvocation is received on the server.

Parameters:
targetObject - the target object to apply the invocation to
Returns:
the invocation result
Throws:
java.lang.NoSuchMethodException - if the method name could not be resolved
java.lang.IllegalAccessException - if the method could not be accessed
java.lang.reflect.InvocationTargetException - if the method invocation resulted in an exception
See Also:
Method.invoke(java.lang.Object, java.lang.Object[])


Copyright (C) 2003-2004 The Spring Framework Project.