|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.WrappedPortletSession
public class WrappedPortletSession
Wrapper for PortletSession.
WrappedSession,
Serialized Form| Constructor Summary | |
|---|---|
WrappedPortletSession(javax.portlet.PortletSession session)
Creates a new wrapped portlet session. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Gets an attribute from this session. |
java.lang.Object |
getAttribute(java.lang.String name,
int scope)
Returns the object bound with the specified name in this session, or null if no object is bound under the name in the given
scope. |
java.util.Set<java.lang.String> |
getAttributeNames()
Gets the current set of attribute names stored in this session. |
java.util.Set<java.lang.String> |
getAttributeNames(int scope)
Gets the current set of attribute names bound to this session in the given scope. |
long |
getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
java.lang.String |
getId()
Gets a string with a unique identifier for the session. |
long |
getLastAccessedTime()
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT, and marked by the time the container received the request. |
int |
getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that this session will be kept open between client accesses. |
javax.portlet.PortletSession |
getPortletSession()
Gets the wrapped PortletSession. |
void |
invalidate()
Invalidates this session then unbinds any objects bound to it. |
boolean |
isNew()
Returns true if the client does not yet know about the session or if the client chooses not to join the session. |
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session. |
void |
removeAttribute(java.lang.String name,
int scope)
Removes the object bound with the specified name and the given scope from this session. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Saves an attribute value in this session. |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
Binds an object to this session in the given scope, using the name specified. |
void |
setMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrappedPortletSession(javax.portlet.PortletSession session)
session - the portlet session to wrap.| Method Detail |
|---|
public int getMaxInactiveInterval()
WrappedSession
getMaxInactiveInterval in interface WrappedSessionHttpSession.getMaxInactiveInterval(),
PortletSession.getMaxInactiveInterval()public java.lang.Object getAttribute(java.lang.String name)
WrappedSession
getAttribute in interface WrappedSessionname - the name of the attribute
null if the attribute is not
defined in the sessionHttpSession.getAttribute(String),
PortletSession.getAttribute(String)
public java.lang.Object getAttribute(java.lang.String name,
int scope)
null if no object is bound under the name in the given
scope.
name - a string specifying the name of the objectscope - session scope of this attribute
java.lang.IllegalStateException - if this method is called on an invalidated session, or the
scope is unknown to the container.
java.lang.IllegalArgumentException - if name is null.PortletSession.getAttribute(String, int),
PortletSession.PORTLET_SCOPE,
PortletSession.APPLICATION_SCOPE
public void setAttribute(java.lang.String name,
java.lang.Object value)
WrappedSession
setAttribute in interface WrappedSessionname - the name of the attributevalue - the attribute valueHttpSession.setAttribute(String, Object),
PortletSession.setAttribute(String, Object)
public void setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
If the value is null, this has the same effect as calling
removeAttribute().
name - the name to which the object is bound; this cannot be
null.value - the object to be boundscope - session scope of this attribute
java.lang.IllegalStateException - if this method is called on a session which has been
invalidated
java.lang.IllegalArgumentException - if name is null or scope is unknown to the
container.PortletSession.setAttribute(String, Object, int),
PortletSession.PORTLET_SCOPE,
PortletSession.APPLICATION_SCOPEpublic javax.portlet.PortletSession getPortletSession()
PortletSession.
public java.util.Set<java.lang.String> getAttributeNames()
WrappedSession
getAttributeNames in interface WrappedSessionHttpSession.getAttributeNames(),
PortletSession.getAttributeNames()public java.util.Set<java.lang.String> getAttributeNames(int scope)
scope - session scope of the attribute names
PortletSession.getAttributeNames()public void invalidate()
WrappedSession
invalidate in interface WrappedSessionHttpSession.invalidate(),
PortletSession.invalidate()public java.lang.String getId()
WrappedSession
getId in interface WrappedSessionHttpSession.getId(),
PortletSession.getId()public long getCreationTime()
WrappedSession
getCreationTime in interface WrappedSessionHttpSession.getCreationTime(),
PortletSession.getCreationTime()public long getLastAccessedTime()
WrappedSessionActions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
getLastAccessedTime in interface WrappedSessionHttpSession.getLastAccessedTime(),
PortletSession.getLastAccessedTime()public boolean isNew()
WrappedSession
isNew in interface WrappedSessionHttpSession.isNew(),
PortletSession.isNew()public void removeAttribute(java.lang.String name)
WrappedSession
removeAttribute in interface WrappedSessionname - the name of the object to remove from this sessionHttpSession.removeAttribute(String),
PortletSession.removeAttribute(String)
public void removeAttribute(java.lang.String name,
int scope)
name - the name of the object to be removed from this sessionscope - session scope of this attribute
java.lang.IllegalStateException - if this method is called on a session which has been
invalidated
java.lang.IllegalArgumentException - if name is null.PortletSession.removeAttribute(String, int),
PortletSession.PORTLET_SCOPE,
PortletSession.APPLICATION_SCOPEpublic void setMaxInactiveInterval(int interval)
WrappedSession
setMaxInactiveInterval in interface WrappedSessioninterval - An integer specifying the number of secondsHttpSession.setMaxInactiveInterval(int),
PortletSession.setMaxInactiveInterval(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||