com.opensymphony.xwork.interceptor
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
categoryLogger
|
protected static org.apache.commons.logging.Log |
log
|
protected String |
logCategory
|
protected String |
logLevel
|
| Constructor Summary | |
|---|---|
TimerInterceptor()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Called to let an interceptor clean up any resources it has allocated. |
protected void |
doLog(org.apache.commons.logging.Log logger,
String message)
Performs the actual logging. |
String |
getLogCategory()
|
protected org.apache.commons.logging.Log |
getLoggerToUse()
Get's the logger to use. |
String |
getLogLevel()
|
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. |
protected String |
invokeUnderTiming(ActionInvocation invocation)
Is called to invoke the action invocation and time the execution time. |
void |
setLogCategory(String logCatgory)
|
void |
setLogLevel(String logLevel)
|
protected boolean |
shouldLog()
Determines if we should log the time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
protected org.apache.commons.logging.Log categoryLogger
protected String logCategory
protected String logLevel
| Constructor Detail |
|---|
public TimerInterceptor()
| Method Detail |
|---|
public String getLogCategory()
public void setLogCategory(String logCatgory)
public String getLogLevel()
public void setLogLevel(String logLevel)
public void destroy()
Interceptor
destroy in interface Interceptorpublic void init()
Interceptorintercept , giving
the Interceptor a chance to initialize any needed resources.
init in interface Interceptorpublic 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().protected String invokeUnderTiming(ActionInvocation invocation) throws Exception
invocation - the action invocation.
Exception - can be thrown from the action.protected boolean shouldLog()
protected org.apache.commons.logging.Log getLoggerToUse()
protected void doLog(org.apache.commons.logging.Log logger,
String message)
logger - the provided logger to use.message - the message to log.
|
WebWork Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||