Top Inners Fields Constructors Methods
org.eclipse.jetty.ee10.servlet

public Class SessionHandler

extends AbstractSessionManager
implements Singleton
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.server.Handler.Singleton, org.eclipse.jetty.server.Handler.Container, org.eclipse.jetty.server.Handler, org.eclipse.jetty.server.Request.Handler, org.eclipse.jetty.util.thread.Invocable, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.LifeCycle
Imports
java.util.Collections, .EnumSet, .Enumeration, .EventListener, .Iterator, .List, .Locale, .Map, .Set, .TreeMap, java.util.concurrent.CopyOnWriteArrayList, jakarta.servlet.ServletContext, .SessionCookieConfig, .SessionTrackingMode, jakarta.servlet.http.HttpSession, .HttpSessionActivationListener, .HttpSessionAttributeListener, .HttpSessionBindingEvent, .HttpSessionBindingListener, .HttpSessionEvent, .HttpSessionIdListener, .HttpSessionListener, org.eclipse.jetty.http.HttpCookie, .HttpCookie.SameSite, org.eclipse.jetty.server.Handler, .Request, .Response, .Server, .Session, org.eclipse.jetty.session.AbstractSessionManager, .ManagedSession, .SessionConfig, org.eclipse.jetty.util.Callback

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
SessionHandler.CookieConfig

CookieConfig Implementation of the jakarta.servlet.SessionCookieConfig.

private class
public static class

Field Summary

Modifier and TypeField and Description
private final SessionCookieConfig
private Handler
private Server
pack-priv final List<HttpSessionAttributeListener>
pack-priv final List<HttpSessionIdListener>
pack-priv final List<HttpSessionListener>
public static final EnumSet<SessionTrackingMode>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the listener was added
addEventListener
(EventListener
the session event listener to add Individual SessionManagers implementations may accept arbitrary listener types, but they are expected to at least handle HttpSessionActivationListener, HttpSessionAttributeListener, HttpSessionBindingListener and HttpSessionListener.
listener
)

Overrides org.eclipse.jetty.util.component.ContainerLifeCycle.addEventListener.

Implements org.eclipse.jetty.util.component.LifeCycle.addEventListener, org.eclipse.jetty.util.component.Container.addEventListener.

Adds an event listener for session-related events.

protected void
protected void
protected void
configureCookies()

Set up cookie configuration based on init params

public void
doStart()

Overrides org.eclipse.jetty.session.AbstractSessionManager.doStart.

Starts the managed lifecycle beans in the order they were added.

public Set<SessionTrackingMode>
public Set<SessionTrackingMode>
public Handler
public Invocable.InvocationType
public ManagedSession
public HttpCookie.SameSite
public Server
public SessionCookieConfig
public boolean
handle(Request
the HTTP request to handle
request
,
Response
the HTTP response to handle
response
,
Callback
the callback to complete when the handling is complete
callback
)

Implements org.eclipse.jetty.server.Request.Handler.handle.

Invoked to handle the passed HTTP request and response.

public Session.API
public void
public void
public void
onSessionCreated(Session
the session on which to call the lifecycle listeners
session
)

Overrides org.eclipse.jetty.session.AbstractSessionManager.onSessionCreated.

Overrides default org.eclipse.jetty.session.SessionManager.onSessionCreated.

Call the session lifecycle listeners in the order they were added.

public void
onSessionDestroyed(Session
the session on which to call the lifecycle listeners
session
)

Overrides org.eclipse.jetty.session.AbstractSessionManager.onSessionDestroyed.

Overrides default org.eclipse.jetty.session.SessionManager.onSessionDestroyed.

Call the session lifecycle listeners in the reverse order they were added.

public void
public void
public boolean
public void
setHandler(Handler
The Handler to set as a child
handler
)

Implements org.eclipse.jetty.server.Handler.Singleton.setHandler.

public void
setSameSite(HttpCookie.SameSite
The sameSite setting for Session cookies (or null for no sameSite setting)
sameSite
)

Overrides org.eclipse.jetty.session.AbstractSessionManager.setSameSite.

Implements org.eclipse.jetty.session.SessionConfig.Mutable.setSameSite.

Set Session cookie sameSite mode.

public void
setServer(Server
the Server to associate to this Handler
server
)

Implements org.eclipse.jetty.server.Handler.setServer.

Set the Server to associate to this Handler.

public void
Inherited from org.eclipse.jetty.session.AbstractSessionManager:
accessaddSessionStreamWrappercalculateInactivityTimeoutcommitcompletedoStopencodeURIgetContextgetManagedSessiongetMaxCookieAgegetMaxInactiveIntervalgetRefreshCookieAgegetSessionCachegetSessionCommentgetSessionContextgetSessionCookiegetSessionCookiegetSessionCookieAttributegetSessionCookieAttributesgetSessionDomaingetSessionIdManagergetSessionIdPathParameterNamegetSessionIdPathParameterNamePrefixgetSessionPathgetSessionsCreatedgetSessionTimeMeangetSessionTimeStdDevgetSessionTimeTotalinvalidateisCheckingRemoteSessionIdEncodingisHttpOnlyisIdInUseisPartitionedisSecureCookiesisSecureRequestOnlyisUsingCookiesisUsingUriParametersisUsingURLsnewSessionnewSessionInactivityTimerrecordSessionTimerenewSessionIdresolveRequestedSessionIdscavengesessionTimerExpiredsetCheckingRemoteSessionIdEncodingsetHttpOnlysetMaxCookieAgesetMaxInactiveIntervalsetPartitionedsetRefreshCookieAgesetSecureCookiessetSecureRequestOnlysetSessionCachesetSessionCommentsetSessionCookiesetSessionCookieAttributesetSessionDomainsetSessionIdManagersetSessionIdPathParameterNamesetSessionPathsetUsingCookiessetUsingUriParameterssetUsingURLs