jodd.madvoc.interceptor
Class EchoInterceptor

java.lang.Object
  extended by jodd.madvoc.interceptor.EchoInterceptor
All Implemented Interfaces:
ActionInterceptor

public class EchoInterceptor
extends java.lang.Object
implements ActionInterceptor

Simple interceptor that measures time and prints out information about invoked actions. User may inherit it and change the way message is printed.


Constructor Summary
EchoInterceptor()
           
 
Method Summary
 java.lang.String intercept(ActionRequest request)
          Measure action invocation time.
protected  void printAfter(ActionRequest request, long executionTime, java.lang.String result)
          Prints out the message.
protected  void printBefore(ActionRequest request)
          Prints out the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EchoInterceptor

public EchoInterceptor()
Method Detail

intercept

public java.lang.String intercept(ActionRequest request)
                           throws java.lang.Exception
Measure action invocation time.

Specified by:
intercept in interface ActionInterceptor
Throws:
java.lang.Exception

printBefore

protected void printBefore(ActionRequest request)
Prints out the message. User can override this method and modify the way the message is printed.


printAfter

protected void printAfter(ActionRequest request,
                          long executionTime,
                          java.lang.String result)
Prints out the message. User can override this method and modify the way the message is printed.



Copyright ©2008 Jodd Team