org.jboss.seam.web
Class Session

java.lang.Object
  extended by org.jboss.seam.core.AbstractMutable
      extended by org.jboss.seam.web.Session
All Implemented Interfaces:
Serializable, Mutable

@Scope(value=SESSION)
@Name(value="org.jboss.seam.web.session")
@BypassInterceptors
@Startup
public class Session
extends AbstractMutable

Controls HttpSession invalidation in any servlet or JSF environment. Since Seam keeps internal state in the HttpSession, it is illegal to call HttpSession.invalidate() while Seam contexts are active. Applications using Seam security should call Identity.logout() instead of calling this component directly.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
Session()
           
 
Method Summary
static Session getInstance()
           
static Session instance()
           
 void invalidate()
          Schedule HttpSession invalidation at the end of the request.
 boolean isInvalid()
          Is HttpSession invalidation scheduled for the end of this request?
 boolean isInvalidateOnSchemeChange()
          Is session invalidation on scheme change enabled?
 boolean isInvalidDueToNewScheme(String requestScheme)
          Should we invalidate the session due to a change in the request scheme?
 void setInvalidateOnSchemeChange(boolean invalidateOnSchemeChange)
          Enable or disable session invalidation on scheme change?
 
Methods inherited from class org.jboss.seam.core.AbstractMutable
clearDirty, setDirty, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

public Session()
Method Detail

isInvalid

public boolean isInvalid()
Is HttpSession invalidation scheduled for the end of this request?


invalidate

public void invalidate()
Schedule HttpSession invalidation at the end of the request.


isInvalidDueToNewScheme

public boolean isInvalidDueToNewScheme(String requestScheme)
Should we invalidate the session due to a change in the request scheme?

Parameters:
requestScheme - the scheme of the current request
Returns:
true if we should invalidate the session

isInvalidateOnSchemeChange

public boolean isInvalidateOnSchemeChange()
Is session invalidation on scheme change enabled?


setInvalidateOnSchemeChange

public void setInvalidateOnSchemeChange(boolean invalidateOnSchemeChange)
Enable or disable session invalidation on scheme change?


instance

public static Session instance()

getInstance

public static Session getInstance()


Copyright © 2011 Seam Framework. All Rights Reserved.