redstone.xmlrpc.interceptors
Class DebugInvocationInterceptor

java.lang.Object
  extended by redstone.xmlrpc.interceptors.DebugInvocationInterceptor
All Implemented Interfaces:
XmlRpcInvocationInterceptor

public class DebugInvocationInterceptor
extends java.lang.Object
implements XmlRpcInvocationInterceptor

Simple invocation processor that traces the calls made through an XmlRpcServer. This is used for debugging purposes only. This may be replaced with a more competent logging processor that perhaps is only logging exceptions that occur.

Author:
Greger Olsson

Constructor Summary
DebugInvocationInterceptor()
           
 
Method Summary
 java.lang.Object after(XmlRpcInvocation invocation, java.lang.Object returnValue)
          Prints trace info on the invocation return value.
 boolean before(XmlRpcInvocation invocation)
          Prints info on the invocation, the method, and its arguments.
 void onException(XmlRpcInvocation invocation, java.lang.Throwable exception)
          Prints trace info on the invocation exception.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugInvocationInterceptor

public DebugInvocationInterceptor()
Method Detail

before

public boolean before(XmlRpcInvocation invocation)
Prints info on the invocation, the method, and its arguments.

Specified by:
before in interface XmlRpcInvocationInterceptor
Parameters:
invocation - The invocation.
Returns:
true if the invocation should proceed, or false if not.

after

public java.lang.Object after(XmlRpcInvocation invocation,
                              java.lang.Object returnValue)
Prints trace info on the invocation return value.

Specified by:
after in interface XmlRpcInvocationInterceptor
Parameters:
invocation - The invocation.
returnValue - The value returned from the method.
Returns:
The (possibly modified) returnValue argument, or null if the interceptor has intercepted the call completely and no value is to be returned.

onException

public void onException(XmlRpcInvocation invocation,
                        java.lang.Throwable exception)
Prints trace info on the invocation exception.

Specified by:
onException in interface XmlRpcInvocationInterceptor
Parameters:
invocation - The invocation.
invocation - The exception thrown by the method.
exception - The exception thrown by the method.