org.glassfish.web.ha.session.management
Class BaseHASession

java.lang.Object
  extended by org.apache.catalina.session.StandardSession
      extended by org.glassfish.web.ha.session.management.BaseHASession
All Implemented Interfaces:
java.io.Serializable, javax.servlet.http.HttpSession, Session, HASession
Direct Known Subclasses:
FullHASession, ModifiedAttributeHASession, ModifiedHASession

public abstract class BaseHASession
extends StandardSession
implements HASession

Author:
lwhite, Rajiv Mordani
See Also:
Serialized Form

Field Summary
protected  boolean persistentFlag
           
protected  java.lang.String userName
           
 
Fields inherited from class org.apache.catalina.session.StandardSession
_sessionLock, attributes, authType, containerEventMethod, containerEventTypes, context, creationTime, debug, EMPTY_ARRAY, expiring, facade, id, info, isNew, isValid, lastAccessedTime, listeners, manager, maxInactiveInterval, NOT_SERIALIZED, notes, principal, sessionContext, sm, ssoId, SYNC_STRING, thisAccessedTime, version
 
Fields inherited from interface org.apache.catalina.Session
SESSION_CREATED_EVENT, SESSION_DESTROYED_EVENT
 
Constructor Summary
BaseHASession(Manager manager)
          Creates a new instance of BaseHASession
 
Method Summary
 java.lang.String getUserName()
          this returns the user name
abstract  boolean isDirty()
          always return true for isDirty() this type of session is always dirty
 boolean isPersistent()
          is the session persistent
 boolean isPersistentFlag()
           
 void recycle()
           
 void save()
           
abstract  void setDirty(boolean value)
          this is deliberately a no-op store framework calls this method so it must be there but must not have any effect
 void setId(java.lang.String id)
          Set the session identifier for this session.
 void setPersistent(boolean value)
          this sets the persistent flag
 void setPrincipal(java.security.Principal principal)
          Overriding the setPrincipal of StandardSession
 void setUserName(java.lang.String value)
          this sets the user name
 java.lang.String superToString()
          Return a string representation of this object.
 void sync()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.catalina.session.StandardSession
access, activate, addSessionListener, endAccess, evaluateIfValid, exclude, expire, expire, expire, fireContainerEvent, fireSessionEvent, getAttribute, getAttributeInternal, getAttributeNames, getAttributes, getAuthType, getBeKey, getCreationTime, getId, getIdInternal, getInfo, getIsValid, getLastAccessedTime, getLastAccessedTimeInternal, getManager, getMaxInactiveInterval, getNote, getNoteNames, getPrincipal, getServletContext, getSession, getSessionContext, getSessionLock, getSessionLockForForeground, getSipApplicationSessionId, getSsoId, getValue, getValueNames, getVersion, hasExpired, hasNonHttpLockOccurred, incrementVersion, invalidate, isForegroundLocked, isNew, isValid, keys, lockBackground, lockForeground, log, log, passivate, putValue, removeAttribute, removeAttribute, removeNote, removeSessionListener, removeValue, setAttribute, setAuthType, setBeKey, setCreationTime, setLastAccessedTime, setManager, setMaxInactiveInterval, setNew, setNote, setSessionLock, setSipApplicationSessionId, setSsoId, setValid, setVersion, tellNew, unlockBackground, unlockForeground, unlockForegroundCompletely
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.glassfish.web.ha.session.management.HASession
getSsoId, incrementVersion, setSsoId, setVersion
 
Methods inherited from interface org.apache.catalina.Session
access, addSessionListener, endAccess, expire, getAttributes, getAuthType, getCreationTime, getId, getIdInternal, getInfo, getIsValid, getLastAccessedTime, getManager, getMaxInactiveInterval, getNote, getNoteNames, getPrincipal, getSession, getVersion, hasExpired, isValid, lockForeground, removeNote, removeSessionListener, setAuthType, setCreationTime, setManager, setMaxInactiveInterval, setNew, setNote, setValid, unlockForeground
 

Field Detail

userName

protected java.lang.String userName

persistentFlag

protected boolean persistentFlag
Constructor Detail

BaseHASession

public BaseHASession(Manager manager)
Creates a new instance of BaseHASession

Method Detail

setId

public void setId(java.lang.String id)
Set the session identifier for this session.

Specified by:
setId in interface Session
Overrides:
setId in class StandardSession
Parameters:
id - The new session identifier

isDirty

public abstract boolean isDirty()
always return true for isDirty() this type of session is always dirty

Specified by:
isDirty in interface HASession

setDirty

public abstract void setDirty(boolean value)
this is deliberately a no-op store framework calls this method so it must be there but must not have any effect

Specified by:
setDirty in interface HASession
Parameters:
value -

isPersistent

public boolean isPersistent()
is the session persistent

Specified by:
isPersistent in interface HASession

setPersistent

public void setPersistent(boolean value)
this sets the persistent flag

Specified by:
setPersistent in interface HASession

getUserName

public java.lang.String getUserName()
this returns the user name

Specified by:
getUserName in interface HASession

setUserName

public void setUserName(java.lang.String value)
this sets the user name

Specified by:
setUserName in interface HASession

setPrincipal

public void setPrincipal(java.security.Principal principal)
Overriding the setPrincipal of StandardSession

Specified by:
setPrincipal in interface Session
Overrides:
setPrincipal in class StandardSession
Parameters:
principal - The new Principal, or null if none

isPersistentFlag

public boolean isPersistentFlag()

recycle

public void recycle()
Specified by:
recycle in interface Session
Overrides:
recycle in class StandardSession

save

public void save()

sync

public void sync()
Specified by:
sync in interface HASession

superToString

public java.lang.String superToString()
Return a string representation of this object.


toString

public java.lang.String toString()
Overrides:
toString in class StandardSession


Copyright © 2012 GlassFish Community. All Rights Reserved.