Package org.codice.ddf.security.session
Class AttributeSharingSessionDataStore
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.session.AbstractSessionDataStore
org.codice.ddf.security.session.AttributeSharingSessionDataStore
- All Implemented Interfaces:
org.eclipse.jetty.server.session.SessionDataMap,org.eclipse.jetty.server.session.SessionDataStore,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
public class AttributeSharingSessionDataStore
extends org.eclipse.jetty.server.session.AbstractSessionDataStore
This implementation of
SessionDataStore communicates
with the AttributeSharingHashSessionIdManager to retrieve the most up-to-date session
attributes.
There is one SessionDataStore instance for each HTTP context on the Jetty server.
In the current way we use pax-web with our jax-rs servers, session attributes are not shared
across contexts. Our SSO solution necessitates a way to share those session attributes since the
security token is stored on the session as an attribute.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.server.session.AbstractSessionDataStore
_context, _gracePeriodSec, _lastExpiryCheckTime, _savePeriodSecFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoGetExpired(Set<String> candidates) org.eclipse.jetty.server.session.SessionDatavoiddumpSelf()booleanvoidinitialize(org.eclipse.jetty.server.session.SessionContext context) booleanorg.eclipse.jetty.server.session.SessionDataorg.eclipse.jetty.server.session.SessionDatanewSessionData(String id, long created, long accessed, long lastAccessed, long maxInactiveMs) voidupdateSessionAttributes(String id, org.eclipse.jetty.server.session.SessionData updatedSessionData) Called by theAttributeSharingHashSessionIdManagerwhenever it updates one of its session's attributes.Methods inherited from class org.eclipse.jetty.server.session.AbstractSessionDataStore
checkStarted, doStart, getExpired, getGracePeriodSec, getSavePeriodSec, setGracePeriodSec, setSavePeriodSec, store, toStringMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Constructor Details
-
AttributeSharingSessionDataStore
public AttributeSharingSessionDataStore()
-
-
Method Details
-
updateSessionAttributes
public void updateSessionAttributes(String id, org.eclipse.jetty.server.session.SessionData updatedSessionData) Called by theAttributeSharingHashSessionIdManagerwhenever it updates one of its session's attributes.- Parameters:
id- the session idupdatedSessionData- the session's attributes
-
getSessionDataMap
-
initialize
- Specified by:
initializein interfaceorg.eclipse.jetty.server.session.SessionDataMap- Overrides:
initializein classorg.eclipse.jetty.server.session.AbstractSessionDataStore- Throws:
Exception
-
doStore
public void doStore(String id, org.eclipse.jetty.server.session.SessionData data, long lastSaveTime) - Specified by:
doStorein classorg.eclipse.jetty.server.session.AbstractSessionDataStore
-
newSessionData
public org.eclipse.jetty.server.session.SessionData newSessionData(String id, long created, long accessed, long lastAccessed, long maxInactiveMs) - Specified by:
newSessionDatain interfaceorg.eclipse.jetty.server.session.SessionDataStore- Overrides:
newSessionDatain classorg.eclipse.jetty.server.session.AbstractSessionDataStore
-
doGetExpired
- Specified by:
doGetExpiredin classorg.eclipse.jetty.server.session.AbstractSessionDataStore
-
isPassivating
public boolean isPassivating() -
exists
-
load
- Specified by:
loadin interfaceorg.eclipse.jetty.server.session.SessionDataMap- Overrides:
loadin classorg.eclipse.jetty.server.session.AbstractSessionDataStore
-
delete
-
doLoad
- Specified by:
doLoadin classorg.eclipse.jetty.server.session.AbstractSessionDataStore- Throws:
Exception
-
dumpSelf
-