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

📄 portletsession.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the object bound with the specified name under the <code>PORTLET_SCOPE</code> from this session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletSession.html#removeAttribute(java.lang.String, int)">removeAttribute</A></B>(java.lang.String&nbsp;name,                int&nbsp;scope)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the object bound with the specified name and the given scope from this session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletSession.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(java.lang.String&nbsp;name,             java.lang.Object&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds an object to this session under the <code>PORTLET_SCOPE</code>, using the name specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletSession.html#setAttribute(java.lang.String, java.lang.Object, int)">setAttribute</A></B>(java.lang.String&nbsp;name,             java.lang.Object&nbsp;value,             int&nbsp;scope)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds an object to this session in the given scope, using the name specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletSession.html#setMaxInactiveInterval(int)">setMaxInactiveInterval</A></B>(int&nbsp;interval)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the time, in seconds, between client requests, before the  portlet container invalidates this session.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="APPLICATION_SCOPE"><!-- --></A><H3>APPLICATION_SCOPE</H3><PRE>static final int <B>APPLICATION_SCOPE</B></PRE><DL><DD>This constant defines an application wide scope for the session attribute. <code>APPLICATION_SCOPE</code> session attributes enable Portlets  within one portlet application to share data. <p> Portlets may need to prefix attributes set in this scope with some ID, to avoid overwriting each other's attributes in the case where two portlets of the same portlet definition are created. <p> Value: <code>0x01</code><P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.portlet.PortletSession.APPLICATION_SCOPE">Constant Field Values</A></DL></DL><HR><A NAME="PORTLET_SCOPE"><!-- --></A><H3>PORTLET_SCOPE</H3><PRE>static final int <B>PORTLET_SCOPE</B></PRE><DL><DD>This constant defines the scope of the session attribute to be private to the portlet and its included resources.  <p> Value: <code>0x02</code><P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.portlet.PortletSession.PORTLET_SCOPE">Constant Field Values</A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>java.lang.Object <B>getAttribute</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the object bound with the specified name in this session under the <code>PORTLET_SCOPE</code>, or <code>null</code> if no  object is bound under the name in that scope.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a string specifying the name of the object<DT><B>Returns:</B><DD>the object with the specified name for                            the <code>PORTLET_SCOPE</code>.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on an                                        invalidated session.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String, int)"><!-- --></A><H3>getAttribute</H3><PRE>java.lang.Object <B>getAttribute</B>(java.lang.String&nbsp;name,                              int&nbsp;scope)</PRE><DL><DD>Returns the object bound with the specified name in this session,  or <code>null</code> if no object is bound under the name in the given scope.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a string specifying the name of the object<DD><CODE>scope</CODE> - session scope of this attribute<DT><B>Returns:</B><DD>the object with the specified name<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on an                                        invalidated session, or the scope is unknown to the container.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>java.util.Enumeration&lt;java.lang.String&gt; <B>getAttributeNames</B>()</PRE><DL><DD>Returns an <code>Enumeration</code> of String objects containing the names of  all the objects bound to this session under the <code>PORTLET_SCOPE</code>, or an empty <code>Enumeration</code> if no attributes are available.<P><DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of                                 <code>String</code> objects specifying the                                names of all the objects bound to                                this session, or an empty <code>Enumeration</code>                 if no attributes are available.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on an                                        invalidated session</DL></DD></DL><HR><A NAME="getAttributeNames(int)"><!-- --></A><H3>getAttributeNames</H3><PRE>java.util.Enumeration&lt;java.lang.String&gt; <B>getAttributeNames</B>(int&nbsp;scope)</PRE><DL><DD>Returns an <code>Enumeration</code> of String objects containing the names of  all the objects bound to this session in the given scope, or an empty <code>Enumeration</code> if no attributes are available in the given scope.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>scope</CODE> - session scope of the attribute names<DT><B>Returns:</B><DD>an <code>Enumeration</code> of                                 <code>String</code> objects specifying the                                names of all the objects bound to                                this session, or an empty <code>Enumeration</code>                             if no attributes are available in the given scope.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on an                                        invalidated session, or the scope is unknown to the container.</DL></DD></DL><HR><A NAME="getCreationTime()"><!-- --></A><H3>getCreationTime</H3><PRE>long <B>getCreationTime</B>()</PRE><DL><DD>Returns the time when this session was created, measured in  milliseconds since midnight January 1, 1970 GMT.<P><DD><DL><DT><B>Returns:</B><DD>a <code>long</code> specifying                                        when this session was created,                                        expressed in                                         milliseconds since 1/1/1970 GMT<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on an                                        invalidated session</DL></DD></DL><HR><A NAME="getId()"><!-- --></A><H3>getId</H3><PRE>java.lang.String <B>getId</B>()</PRE><DL><DD>Returns a string containing the unique identifier assigned to this session.<P><DD><DL><DT><B>Returns:</B><DD>a string specifying the identifier                                        assigned to this session</DL></DD></DL><HR><A NAME="getLastAccessedTime()"><!-- --></A><H3>getLastAccessedTime</H3><PRE>long <B>getLastAccessedTime</B>()</PRE><DL><DD>Returns the last time the client sent a request associated with this session,  as the number of milliseconds since midnight January 1, 1970 GMT.   <p>Actions that your portlet takes, such as getting or setting a value associated with the session, do not affect the access time.<P><DD><DL><DT><B>Returns:</B><DD>a <code>long</code>                                        representing the last time                                         the client sent a request associated                                        with this session, expressed in                                         milliseconds since 1/1/1970 GMT</DL></DD></DL><HR><A NAME="getMaxInactiveInterval()"><!-- --></A><H3>getMaxInactiveInterval</H3><PRE>int <B>getMaxInactiveInterval</B>()</PRE><DL><DD>Returns the maximum time interval, in seconds, for which the portlet container  keeps this session open between client accesses. After this interval,  the portlet container invalidates the session.  The maximum time  interval can be set with the <code>setMaxInactiveInterval</code> method. A negative time indicates the session should never timeout.<P><DD><DL><DT><B>Returns:</B><DD>an integer specifying the number of                        seconds this session remains open                        between client requests<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletSession.html#setMaxInactiveInterval(int)"><CODE>setMaxInactiveInterval(int)</CODE></A></DL></DD></DL><HR><A NAME="invalidate()"><!-- --></A><H3>invalidate</H3><PRE>void <B>invalidate</B>()</PRE><DL><DD>Invalidates this session (all scopes) and unbinds any objects bound to it.   <p> Invalidating the portlet session will result in invalidating the underlying <code>HttpSession</code><P><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a

⌨️ 快捷键说明

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