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 booleanpersistentFlagprotected StringuserName-
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 StringgetUserName()this returns the user nameabstract booleanisDirty()always return true for isDirty() this type of session is always dirtybooleanisPersistent()is the session persistentbooleanisPersistentFlag()voidrecycle()Release all object references, and initialize instance variables, in preparation for reuse of this object.voidsave()abstract voidsetDirty(boolean value)this is deliberately a no-op store framework calls this method so it must be there but must not have any effectvoidsetId(String id)Set the session identifier for this session.voidsetPersistent(boolean value)this sets the persistent flagvoidsetPrincipal(Principal principal)Overriding the setPrincipal of StandardSessionvoidsetUserName(String value)this sets the user namevoidsync()StringtoString()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:
setIdin interfaceSession- Overrides:
setIdin 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:
isPersistentin interfaceHASession
-
setPersistent
public void setPersistent(boolean value)
this sets the persistent flag- Specified by:
setPersistentin interfaceHASession
-
getUserName
public String getUserName()
this returns the user name- Specified by:
getUserNamein interfaceHASession
-
setUserName
public void setUserName(String value)
this sets the user name- Specified by:
setUserNamein interfaceHASession
-
setPrincipal
public void setPrincipal(Principal principal)
Overriding the setPrincipal of StandardSession- Specified by:
setPrincipalin interfaceSession- Overrides:
setPrincipalin classStandardSession- Parameters:
principal- The new Principal, ornullif none
-
isPersistentFlag
public boolean isPersistentFlag()
-
recycle
public void recycle()
Description copied from class:StandardSessionRelease all object references, and initialize instance variables, in preparation for reuse of this object.- Specified by:
recyclein interfaceSession- Overrides:
recyclein classStandardSession
-
save
public void save()
-
toString
public String toString()
Description copied from class:StandardSessionReturn a string representation of this object.- Overrides:
toStringin classStandardSession
-
-