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

📄 portletsession.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public 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.<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>public 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.<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<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>public java.util.Enumeration <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.<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>public java.util.Enumeration <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.<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</DL></DD></DL><HR><A NAME="getCreationTime()"><!-- --></A><H3>getCreationTime</H3><PRE>public long <B>getCreationTime</B>()</PRE><DL><DD>Returns the time when this session was created, measured in  milliseconds since midnight January 1, 1970 GMT.<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>public java.lang.String <B>getId</B>()</PRE><DL><DD>Returns a string containing the unique identifier assigned to this session.<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>public 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.<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>public 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.<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>public 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><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a					session which has already been invalidated</DL></DD></DL><HR><A NAME="isNew()"><!-- --></A><H3>isNew</H3><PRE>public boolean <B>isNew</B>()</PRE><DL><DD>Returns true if the client does not yet know about the session or  if the client chooses not to join the session.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if the 					server has created a session, 					but the client has not joined yet.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a					session which has already been invalidated</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>removeAttribute</H3><PRE>public void <B>removeAttribute</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Removes the object bound with the specified name under the <code>PORTLET_SCOPE</code> from this session. If the session does not have an object bound with the specified name, this method does nothing.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object to be               removed from this session in the                <code> PORTLET_SCOPE</code>.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a                   session which has been invalidated<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String, int)"><!-- --></A><H3>removeAttribute</H3><PRE>public void <B>removeAttribute</B>(java.lang.String&nbsp;name,                            int&nbsp;scope)</PRE><DL><DD>Removes the object bound with the specified name and the given scope from this session. If the session does not have an object bound with the specified name, this method does nothing.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object to be               removed from this session<DD><CODE>scope</CODE> - session scope of this attribute<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a                   session which has been invalidated<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</B>(java.lang.String&nbsp;name,                         java.lang.Object&nbsp;value)</PRE><DL><DD>Binds an object to this session under the <code>PORTLET_SCOPE</code>, using the name specified.   If an object of the same name in this scope is already bound to the session, that object is replaced. <p>After this method has been executed, and if the new object implements <code>HttpSessionBindingListener</code>, the container calls  <code>HttpSessionBindingListener.valueBound</code>. The container then    notifies any <code>HttpSessionAttributeListeners</code> in the web  application. <p>If an object was already bound to this session  that implements <code>HttpSessionBindingListener</code>, its  <code>HttpSessionBindingListener.valueUnbound</code> method is called. <p>If the value is <code>null</code>, this has the same effect as calling  <code>removeAttribute()</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to which the object is bound under                            the <code>PORTLET_SCOPE</code>;				this cannot be <code>null</code>.<DD><CODE>value</CODE> - the object to be bound<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a					session which has been invalidated<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="setAttribute(java.lang.String, java.lang.Object, int)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</B>(java.lang.String&nbsp;name,                         java.lang.Object&nbsp;value,                         int&nbsp;scope)</PRE><DL><DD>Binds an object to this session in the given scope, using the name specified.   If an object of the same name in this scope is already bound to the session, that object is replaced. <p>After this method has been executed, and if the new object implements <code>HttpSessionBindingListener</code>, the container calls  <code>HttpSessionBindingListener.valueBound</code>. The container then    notifies any <code>HttpSessionAttributeListeners</code> in the web  application. <p>If an object was already bound to this session  that implements <code>HttpSessionBindingListener</code>, its  <code>HttpSessionBindingListener.valueUnbound</code> method is called. <p>If the value is <code>null</code>, this has the same effect as calling  <code>removeAttribute()</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to which the object is bound;				this cannot be <code>null</code>.<DD><CODE>value</CODE> - the object to be bound<DD><CODE>scope</CODE> - session scope of this attribute<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called on a					session which has been invalidated<DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="setMaxInactiveInterval(int)"><!-- --></A><H3>setMaxInactiveInterval</H3><PRE>public void <B>setMaxInactiveInterval</B>(int&nbsp;interval)</PRE><DL><DD>Specifies the time, in seconds, between client requests, before the  portlet container invalidates this session. A negative time indicates the session should never timeout.<DD><DL><DT><B>Parameters:</B><DD><CODE>interval</CODE> - An integer specifying the number 				of seconds</DL></DD></DL><HR><A NAME="getPortletContext()"><!-- --></A><H3>getPortletContext</H3><PRE>public <A HREF="../../javax/portlet/PortletContext.html">PortletContext</A> <B>getPortletContext</B>()</PRE><DL><DD>Returns the portlet application context associated with this session.<DD><DL><DT><B>Returns:</B><DD>the portlet application context</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="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="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>Portlet API (V1.0) </EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/portlet/PortletResponse.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/portlet/PortletURL.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="PortletSession.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;CONSTR&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;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><a href=license.txt >Copyright</a> &#169; 2003 IBM Corporation and Sun Microsystems, Inc. All rights reserved</BODY></HTML>

⌨️ 快捷键说明

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