com.opensymphony.webwork.interceptor
Class TokenInterceptor

java.lang.Object
  extended bycom.opensymphony.webwork.interceptor.TokenInterceptor
All Implemented Interfaces:
com.opensymphony.xwork.interceptor.Interceptor
Direct Known Subclasses:
TokenSessionStoreInterceptor

public class TokenInterceptor
extends Object
implements com.opensymphony.xwork.interceptor.Interceptor

Author:
Jason Carreira

Field Summary
static String INVALID_TOKEN_CODE
           
 
Constructor Summary
TokenInterceptor()
           
 
Method Summary
 void destroy()
          Called to let an interceptor clean up any resources it has allocated.
protected  String handleInvalidToken(com.opensymphony.xwork.ActionInvocation invocation)
           
protected  String handleValidToken(com.opensymphony.xwork.ActionInvocation invocation)
           
 void init()
          Called after an Interceptor is created, but before any requests are processed using the intercept(ActionInvocation) method..
 String intercept(com.opensymphony.xwork.ActionInvocation invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_TOKEN_CODE

public static final String INVALID_TOKEN_CODE
See Also:
Constant Field Values
Constructor Detail

TokenInterceptor

public TokenInterceptor()
Method Detail

destroy

public void destroy()
Called to let an interceptor clean up any resources it has allocated. Does nothing by default - subclass and overwrite to customize.

Specified by:
destroy in interface com.opensymphony.xwork.interceptor.Interceptor

init

public void init()
Called after an Interceptor is created, but before any requests are processed using the intercept(ActionInvocation) method.. This gives the Interceptor a chance to initialize any needed resources. Currently does nothing - subclass and overwrite to customize.

Specified by:
init in interface com.opensymphony.xwork.interceptor.Interceptor

intercept

public String intercept(com.opensymphony.xwork.ActionInvocation invocation)
                 throws Exception
Specified by:
intercept in interface com.opensymphony.xwork.interceptor.Interceptor
Parameters:
invocation - an encapsulation of the action execution state.
Throws:
Exception

handleInvalidToken

protected String handleInvalidToken(com.opensymphony.xwork.ActionInvocation invocation)
                             throws Exception
Parameters:
invocation -
Returns:
Throws:
Exception

handleValidToken

protected String handleValidToken(com.opensymphony.xwork.ActionInvocation invocation)
                           throws Exception
Parameters:
invocation -
Throws:
Exception

WebWork Project Page