|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork.interceptor.TimerInterceptor
public class TimerInterceptor
This interceptor logs the amount of time in milliseconds. In order for this interceptor to work properly, the logging framework must be set to at least the INFO level. This interceptor relies on the Commons Logging API to report its execution-time value. TODO: Describe the paramters for this Interceptor. TODO: Discuss some possible extension of the Interceptor.
<!-- records only the action's execution time -->
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="completeStack"/>
<interceptor-ref name="timer"/>
<result name="success">good_result.ftl</result>
</action>
<!-- records action's execution time as well as other interceptors-->
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="timer"/>
<interceptor-ref name="completeStack"/>
<result name="success">good_result.ftl</result>
</action>
| Constructor Summary | |
|---|---|
TimerInterceptor()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Called to let an interceptor clean up any resources it has allocated. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
void |
init()
Called after an interceptor is created, but before any requests are processed using intercept , giving
the Interceptor a chance to initialize any needed resources. |
String |
intercept(ActionInvocation invocation)
Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the ActionInvocation or to short-circuit the processing and just return a String return code. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimerInterceptor()
| Method Detail |
|---|
public void destroy()
Interceptor
destroy in interface Interceptorpublic void init()
Interceptorintercept , giving
the Interceptor a chance to initialize any needed resources.
init in interface Interceptor
public String intercept(ActionInvocation invocation)
throws Exception
InterceptorActionInvocation or to short-circuit the processing and just return a String return code.
intercept in interface InterceptorActionInvocation.invoke(), or from the interceptor itself.
Exception - any system-level error, as defined in Action.execute().public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
XWork Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||