Class BaseHASession
- java.lang.Object
-
- org.apache.catalina.session.StandardSession
-
- org.glassfish.web.ha.session.management.BaseHASession
-
- All Implemented Interfaces:
jakarta.servlet.http.HttpSession
,Serializable
,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
Fields Modifier and Type Field Description protected boolean
persistentFlag
protected String
userName
-
Fields inherited from class org.apache.catalina.session.StandardSession
_sessionLock, attributes, authType, containerEventMethod, context, creationTime, debug, EMPTY_ARRAY, expiring, facade, id, info, isNew, isValid, lastAccessedTime, listeners, manager, maxInactiveInterval, NOT_SERIALIZED, notes, principal, SEPARATE_BUFFER_SERIALIZATION, sessionLockMonitor, ssoId, ssoVersion, SYNC_STRING, thisAccessedTime, threadContextManager, version
-
Fields inherited from interface org.apache.catalina.Session
SESSION_CREATED_EVENT, SESSION_DESTROYED_EVENT
-
-
Constructor Summary
Constructors Constructor Description BaseHASession(Manager manager)
Creates a new instance of BaseHASession
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getUserName()
this returns the user nameabstract boolean
isDirty()
always return true for isDirty() this type of session is always dirtyboolean
isPersistent()
is the session persistentboolean
isPersistentFlag()
void
recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object.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 effectvoid
setId(String id)
Set the session identifier for this session.void
setPersistent(boolean value)
this sets the persistent flagvoid
setPrincipal(Principal principal)
Overriding the setPrincipal of StandardSessionvoid
setUserName(String value)
this sets the user namevoid
sync()
String
toString()
Return a string representation of this object.-
Methods inherited from class org.apache.catalina.session.StandardSession
access, activate, addSessionListener, endAccess, evaluateIfValid, exclude, expire, expire, expire, fireContainerEvent, fireSessionEvent, getAttribute, getAttributeInternal, getAttributeNames, getAttributeNamesInternal, getAttributes, getAuthType, getBeKey, getCreationTime, getId, getIdInternal, getInfo, getIsValid, getLastAccessedTime, getLastAccessedTimeInternal, getManager, getMaxInactiveInterval, getNote, getNoteNames, getPrincipal, getServletContext, getSession, getSessionLock, getSessionLockForForeground, getSipApplicationSessionId, getSsoId, getSsoVersion, getVersion, hasExpired, hasNonHttpLockOccurred, incrementVersion, invalidate, isForegroundLocked, isNew, isValid, keys, lockBackground, lockForeground, log, log, log, passivate, removeAttribute, removeAttribute, removeNote, removeSessionListener, setAttribute, setAuthType, setBeKey, setCreationTime, setLastAccessedTime, setManager, setMaxInactiveInterval, setNew, setNote, setSessionLock, setSipApplicationSessionId, setSsoId, setSsoVersion, 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, getSsoVersion, getVersion, hasExpired, isValid, lockForeground, removeNote, removeSessionListener, setAuthType, setCreationTime, setManager, setMaxInactiveInterval, setNew, setNote, setSsoVersion, setValid, unlockForeground
-
-
-
-
Field Detail
-
userName
protected 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(String id)
Set the session identifier for this session.- Specified by:
setId
in interfaceSession
- Overrides:
setId
in classStandardSession
- Parameters:
id
- The new session identifier
-
isDirty
public abstract boolean isDirty()
always return true for isDirty() this type of session is always dirty
-
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
-
isPersistent
public boolean isPersistent()
is the session persistent- Specified by:
isPersistent
in interfaceHASession
-
setPersistent
public void setPersistent(boolean value)
this sets the persistent flag- Specified by:
setPersistent
in interfaceHASession
-
getUserName
public String getUserName()
this returns the user name- Specified by:
getUserName
in interfaceHASession
-
setUserName
public void setUserName(String value)
this sets the user name- Specified by:
setUserName
in interfaceHASession
-
setPrincipal
public void setPrincipal(Principal principal)
Overriding the setPrincipal of StandardSession- Specified by:
setPrincipal
in interfaceSession
- Overrides:
setPrincipal
in classStandardSession
- Parameters:
principal
- The new Principal, ornull
if none
-
isPersistentFlag
public boolean isPersistentFlag()
-
recycle
public void recycle()
Description copied from class:StandardSession
Release all object references, and initialize instance variables, in preparation for reuse of this object.- Specified by:
recycle
in interfaceSession
- Overrides:
recycle
in classStandardSession
-
save
public void save()
-
toString
public String toString()
Description copied from class:StandardSession
Return a string representation of this object.- Overrides:
toString
in classStandardSession
-
-