⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tokenprocessor.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="instance"><!-- --></A><H3>
instance</H3>
<PRE>
private static <A HREF="../../../../org/apache/struts/util/TokenProcessor.html">TokenProcessor</A> <B>instance</B></PRE>
<DL>
<DD>The singleton instance of this class.</DL>
<HR>

<A NAME="previous"><!-- --></A><H3>
previous</H3>
<PRE>
private long <B>previous</B></PRE>
<DL>
<DD>The timestamp used most recently to generate a token value.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="TokenProcessor()"><!-- --></A><H3>
TokenProcessor</H3>
<PRE>
protected <B>TokenProcessor</B>()</PRE>
<DL>
<DD>Protected constructor for TokenProcessor.  Use TokenProcessor.getInstance() to obtain a reference to the processor.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getInstance()"><!-- --></A><H3>
getInstance</H3>
<PRE>
public static <A HREF="../../../../org/apache/struts/util/TokenProcessor.html">TokenProcessor</A> <B>getInstance</B>()</PRE>
<DL>
<DD>Retrieves the singleton instance of this class.</DL>
<HR>

<A NAME="isTokenValid(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
isTokenValid</H3>
<PRE>
public boolean <B>isTokenValid</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>
<DL>
<DD>Return <code>true</code> if there is a transaction token stored in the user's current session, and the value submitted as a request parameter with this action matches it.  Returns <code>false</code> under any of the following circumstances: <ul> <li>No session associated with this request</li> <li>No transaction token saved in the session</li> <li>No transaction token included as a request parameter</li> <li>The included transaction token value does not match the     transaction token in the user's session</li> </ul><DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing</DL>
</DD>
</DL>
<HR>

<A NAME="isTokenValid(javax.servlet.http.HttpServletRequest, boolean)"><!-- --></A><H3>
isTokenValid</H3>
<PRE>
public boolean <B>isTokenValid</B>(javax.servlet.http.HttpServletRequest&nbsp;request,                            boolean&nbsp;reset)</PRE>
<DL>
<DD>Return <code>true</code> if there is a transaction token stored in the user's current session, and the value submitted as a request parameter with this action matches it.  Returns <code>false</code> <ul> <li>No session associated with this request</li> <li>No transaction token saved in the session</li> <li>No transaction token included as a request parameter</li> <li>The included transaction token value does not match the     transaction token in the user's session</li> </ul><DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DD><CODE>reset</CODE> - Should we reset the token after checking it?</DL>
</DD>
</DL>
<HR>

<A NAME="resetToken(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
resetToken</H3>
<PRE>
public void <B>resetToken</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>
<DL>
<DD>Reset the saved transaction token in the user's session.  This indicates that transactional token checking will not be needed on the next request that is submitted.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing</DL>
</DD>
</DL>
<HR>

<A NAME="saveToken(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
saveToken</H3>
<PRE>
public void <B>saveToken</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>
<DL>
<DD>Save a new transaction token in the user's current session, creating a new session if necessary.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing</DL>
</DD>
</DL>
<HR>

<A NAME="generateToken(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
generateToken</H3>
<PRE>
public java.lang.String <B>generateToken</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>
<DL>
<DD>Generate a new transaction token, to be used for enforcing a single request for a particular transaction.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The request we are processing</DL>
</DD>
</DL>
<HR>

<A NAME="toHex(byte[])"><!-- --></A><H3>
toHex</H3>
<PRE>
private java.lang.String <B>toHex</B>(byte[]&nbsp;buffer)</PRE>
<DL>
<DD>Convert a byte array to a String of hexadecimal digits and return it.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - The byte array to be converted</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TokenProcessor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/struts/util/ServletContextWriter.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/struts/util/WildcardHelper.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TokenProcessor.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -