org.apache.pluto.internal.impl
Class PortletSessionImpl

java.lang.Object
  extended byorg.apache.pluto.internal.impl.PortletSessionImpl
All Implemented Interfaces:
javax.servlet.http.HttpSession, javax.portlet.PortletSession

public class PortletSessionImpl
extends java.lang.Object
implements javax.portlet.PortletSession, javax.servlet.http.HttpSession

Implementation of the javax.portlet.PortletSession interface.


Field Summary
 
Fields inherited from interface javax.portlet.PortletSession
APPLICATION_SCOPE, PORTLET_SCOPE
 
Constructor Summary
PortletSessionImpl(javax.portlet.PortletContext portletContext, InternalPortletWindow internalPortletWindow, javax.servlet.http.HttpSession httpSession)
          Constructs an instance.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           
 java.lang.Object getAttribute(java.lang.String name, int scope)
          Returns the attribute of the specified name under the given scope.
 java.util.Enumeration getAttributeNames()
           
 java.util.Enumeration getAttributeNames(int scope)
           
 long getCreationTime()
           
 java.lang.String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 javax.portlet.PortletContext getPortletContext()
           
 javax.servlet.ServletContext getServletContext()
           
 javax.servlet.http.HttpSessionContext getSessionContext()
          Deprecated.  
 java.lang.Object getValue(java.lang.String name)
           
 java.lang.String[] getValueNames()
          Deprecated.  
 void invalidate()
           
 boolean isNew()
           
 void putValue(java.lang.String name, java.lang.Object value)
           
 void removeAttribute(java.lang.String name)
           
 void removeAttribute(java.lang.String name, int scope)
           
 void removeValue(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
           
 void setAttribute(java.lang.String name, java.lang.Object value, int scope)
           
 void setMaxInactiveInterval(int interval)
          Specifies the time, in seconds, between client requests, before the portlet container invalidates this session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletSessionImpl

public PortletSessionImpl(javax.portlet.PortletContext portletContext,
                          InternalPortletWindow internalPortletWindow,
                          javax.servlet.http.HttpSession httpSession)
Constructs an instance.

Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface javax.portlet.PortletSession

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     int scope)
Returns the attribute of the specified name under the given scope.

Specified by:
getAttribute in interface javax.portlet.PortletSession
Parameters:
name - the attribute name.
scope - the scope under which the attribute object is stored.
Returns:
the attribute object.

getAttributeNames

public java.util.Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface javax.portlet.PortletSession

getAttributeNames

public java.util.Enumeration getAttributeNames(int scope)
Specified by:
getAttributeNames in interface javax.portlet.PortletSession

removeAttribute

public void removeAttribute(java.lang.String name)
Specified by:
removeAttribute in interface javax.portlet.PortletSession

removeAttribute

public void removeAttribute(java.lang.String name,
                            int scope)
Specified by:
removeAttribute in interface javax.portlet.PortletSession

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Specified by:
setAttribute in interface javax.portlet.PortletSession

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value,
                         int scope)
Specified by:
setAttribute in interface javax.portlet.PortletSession

getPortletContext

public javax.portlet.PortletContext getPortletContext()
Specified by:
getPortletContext in interface javax.portlet.PortletSession

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface javax.portlet.PortletSession

getId

public java.lang.String getId()
Specified by:
getId in interface javax.portlet.PortletSession

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface javax.portlet.PortletSession

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface javax.portlet.PortletSession

invalidate

public void invalidate()
                throws java.lang.IllegalStateException
Specified by:
invalidate in interface javax.portlet.PortletSession
Throws:
java.lang.IllegalStateException

isNew

public boolean isNew()
              throws java.lang.IllegalStateException
Specified by:
isNew in interface javax.portlet.PortletSession
Throws:
java.lang.IllegalStateException

setMaxInactiveInterval

public void setMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests, before the portlet container invalidates this session. A negative time indicates the session should never timeout.

[Portlet Spec. PLT. 15.4.] If the PortletSession object is invalidated by a portlet, the portlet container must invalidate the associated HttpSession object.

Specified by:
setMaxInactiveInterval in interface javax.portlet.PortletSession
Parameters:
interval - an integer specifying the number of seconds.

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface javax.servlet.http.HttpSession

getSessionContext

public javax.servlet.http.HttpSessionContext getSessionContext()
Deprecated.  

DEPRECATED: implemented for backwards compatability with HttpSession.

Specified by:
getSessionContext in interface javax.servlet.http.HttpSession

getValue

public java.lang.Object getValue(java.lang.String name)
Specified by:
getValue in interface javax.servlet.http.HttpSession

getValueNames

public java.lang.String[] getValueNames()
Deprecated.  

DEPRECATED: Implemented for backwards compatibility with HttpSession.

Specified by:
getValueNames in interface javax.servlet.http.HttpSession

putValue

public void putValue(java.lang.String name,
                     java.lang.Object value)
Specified by:
putValue in interface javax.servlet.http.HttpSession

removeValue

public void removeValue(java.lang.String name)
Specified by:
removeValue in interface javax.servlet.http.HttpSession


Copyright © 2003-2008 Apache Software Foundation. All Rights Reserved.