org.apache.struts2.interceptor
类 TokenSessionStoreInterceptor

java.lang.Object
  继承者 com.opensymphony.xwork2.interceptor.AbstractInterceptor
      继承者 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
          继承者 org.apache.struts2.interceptor.TokenInterceptor
              继承者 org.apache.struts2.interceptor.TokenSessionStoreInterceptor
所有已实现的接口:
com.opensymphony.xwork2.interceptor.Interceptor, Serializable

public class TokenSessionStoreInterceptor
extends TokenInterceptor

This interceptor builds off of the TokenInterceptor, providing advanced logic for handling invalid tokens. Unlike the normal token interceptor, this interceptor will attempt to provide intelligent fail-over in the event of multiple requests using the same session. That is, it will block subsequent requests until the first request is complete, and then instead of returning the invalid.token code, it will attempt to display the same response that the original, valid action invocation would have displayed if no multiple requests were submitted in the first place.

NOTE: As this method extends off MethodFilterInterceptor, it is capable of deciding if it is applicable only to selective methods in the action class. See MethodFilterInterceptor for more info.

Interceptor parameters:

Extending the interceptor:

There are no known extension points for this interceptor.

Example code:

 

 <action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="tokenSession/>
     <interceptor-ref name="basicStack"/>
     <result name="success">good_result.ftl</result>
 </action>

 <-- In this case, myMethod of the action class will not
        get checked for invalidity of token -->
 <action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="tokenSession>
         <param name="excludeMethods">myMethod</param>
     </interceptor-ref name="tokenSession>
     <interceptor-ref name="basicStack"/>
     <result name="success">good_result.ftl</result>
 </action>

 
 

另请参见:
序列化表格

字段摘要
 
从类 org.apache.struts2.interceptor.TokenInterceptor 继承的字段
INVALID_TOKEN_CODE
 
构造方法摘要
TokenSessionStoreInterceptor()
           
 
方法摘要
 
从类 org.apache.struts2.interceptor.TokenInterceptor 继承的方法
setTextProvider
 
从类 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor 继承的方法
getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods
 
从类 com.opensymphony.xwork2.interceptor.AbstractInterceptor 继承的方法
destroy, init
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

TokenSessionStoreInterceptor

public TokenSessionStoreInterceptor()