redstone.xmlrpc
Class XmlRpcInvocation

java.lang.Object
  extended by redstone.xmlrpc.XmlRpcInvocation

public class XmlRpcInvocation
extends java.lang.Object

Contains information about a particular invocation intercepted by an invocation processor. Invocation objects are only used on the server side, and only when calling on invocation processors.

Author:
Greger Olsson

Constructor Summary
XmlRpcInvocation(int invocationId, java.lang.String handlerName, java.lang.String methodName, XmlRpcInvocationHandler handler, java.util.List arguments, java.io.Writer writer)
           
 
Method Summary
 java.util.List getArguments()
          Returns a list of arguments supplied in the invocation.
 XmlRpcInvocationHandler getHandler()
          Returns the handler that will be or has been invoked.
 java.lang.String getHandlerName()
          Returns the name of the invocation handler targeted by the invocation.
 int getInvocationId()
          A sequence number for tracing invocations between preProcess() and postProcess() calls.
 java.lang.String getMethodName()
          Returns the name of the method in the invocation handler targeted by the invocation.
 java.io.Writer getWriter()
          Returns the writer that the response of the invocation will be written to.
 void setMethodName(java.lang.String methodName)
          Sets a new method name to be invoked instead of the original method name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcInvocation

public XmlRpcInvocation(int invocationId,
                        java.lang.String handlerName,
                        java.lang.String methodName,
                        XmlRpcInvocationHandler handler,
                        java.util.List arguments,
                        java.io.Writer writer)
Parameters:
invocationId - The unique identity of the invocation.
handlerName - The name of the handler that was invoked.
methodName - The name of the method within the handler that was invoked.
handler - The invocation handler that was invoked.
arguments - Arguments used in the invocation.
writer - The java.io.Writer that the response will be written over.
Method Detail

getInvocationId

public int getInvocationId()
A sequence number for tracing invocations between preProcess() and postProcess() calls. This is unique within each session. That is, the sequence is restarted when the application restarts.

Returns:
The sequence number of the call.

getHandlerName

public java.lang.String getHandlerName()
Returns the name of the invocation handler targeted by the invocation.

Returns:
The name of the invocation handler targeted by the invocation.

getMethodName

public java.lang.String getMethodName()
Returns the name of the method in the invocation handler targeted by the invocation. Using naming conventions for method names various types of filters and processors may be created.

Returns:
The name of the method in the invocation handler targeted by the invocation.

setMethodName

public void setMethodName(java.lang.String methodName)
Sets a new method name to be invoked instead of the original method name. This can be handy when using a naming convention where the public XML-RPC interface uses names with prefixes, for instance, which are stripped away before reaching the invocation handler, and so forth.

Parameters:
methodName - The name of the method to user.

getArguments

public java.util.List getArguments()
Returns a list of arguments supplied in the invocation. This list may be modified by the processor. Arguments may be analyzed, modified, added or removed before a call is dispatched to the handler method.

Returns:
A list of arguments supplied in the invocation.

getHandler

public XmlRpcInvocationHandler getHandler()
Returns the handler that will be or has been invoked. This information may be used in conjunction with the handler name and method name to achieve some filtering scheme or some other type of processing procedure.

Returns:
Returns the handler that will be or has been invoked.

getWriter

public java.io.Writer getWriter()
Returns the writer that the response of the invocation will be written to. The interceptor may write custom content to the writer as a custom header to the original response or as a complete replacement to the response.

Returns:
The writer that the response will be written to.
See Also:
XmlRpcInvocationInterceptor.after(XmlRpcInvocation, Object)