Package org.eclipse.jetty.ee9.nested
Class ContextHandler.CoreContextRequest
java.lang.Object
org.eclipse.jetty.server.Request.Wrapper
org.eclipse.jetty.server.handler.ContextRequest
org.eclipse.jetty.ee9.nested.ContextHandler.CoreContextRequest
- All Implemented Interfaces:
Content.Source
,Request
,Attributes
,Invocable
- Enclosing class:
ContextHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Request
Request.AttributesWrapper, Request.AuthenticationState, Request.Handler, Request.ServeAs, Request.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULL
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOP
Fields inherited from interface org.eclipse.jetty.server.Request
COOKIE_ATTRIBUTE, DEFAULT_LOCALES
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CoreContextRequest
(Request wrapped, ContextHandler.ScopedContext context, HttpChannel httpChannel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Ensure that each session is committed - ie written out to storage if necessary - because the response is about to be returned to the client.void
Release each of the sessions as the request is now completegetManagedSession
(SessionManager manager) Retrieve an existing session, if one exists, for a given SessionManager.getSession
(boolean create) Get aSession
associated with the request.void
setManagedSession
(ManagedSession managedSession) void
setRequestedSession
(AbstractSessionManager.RequestedSession requestedSession) Remember the session that was extracted from the id in the requestvoid
setSessionManager
(SessionManager sessionManager) Methods inherited from class org.eclipse.jetty.server.handler.ContextRequest
addFailureListener, addIdleTimeoutListener, demand, getContext
Methods inherited from class org.eclipse.jetty.server.Request.Wrapper
addHttpStreamWrapper, asAttributeMap, clearAttributes, consumeAvailable, fail, getAttribute, getAttributeNameSet, getBeginNanoTime, getComponents, getConnectionMetaData, getHeaders, getHeadersNanoTime, getHttpURI, getId, getLength, getMethod, getTrailers, getTunnelSupport, getWrapped, isSecure, push, read, removeAttribute, setAttribute, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.Attributes
equals, hashCode
Methods inherited from interface org.eclipse.jetty.io.Content.Source
fail, rewind
Methods inherited from interface org.eclipse.jetty.util.thread.Invocable
getInvocationType
-
Constructor Details
-
CoreContextRequest
protected CoreContextRequest(Request wrapped, ContextHandler.ScopedContext context, HttpChannel httpChannel)
-
-
Method Details
-
changeSessionId
-
getHttpChannel
-
getManagedSession
-
getManagedSession
Retrieve an existing session, if one exists, for a given SessionManager. A session belongs to a single SessionManager, and a context can only have a single SessionManager. Thus, calling this method is equivalent to asking "Does a ManagedSession already exist for the given context?".- Parameters:
manager
- the SessionManager that should be associated with a ManagedSession- Returns:
- the ManagedSession that already exists in the given context and is managed by the given SessionManager.
-
setManagedSession
-
getSessionManager
-
setRequestedSession
Remember the session that was extracted from the id in the request- Parameters:
requestedSession
- info about the session matching the id in the request
-
completeSessions
public void completeSessions()Release each of the sessions as the request is now complete -
commitSessions
public void commitSessions()Ensure that each session is committed - ie written out to storage if necessary - because the response is about to be returned to the client. -
getRequestedSession
-
setSessionManager
-
getSession
Description copied from interface:Request
Get a
Session
associated with the request. Sessions may not be supported by a given configuration, in which casenull
will be returned.- Specified by:
getSession
in interfaceRequest
- Overrides:
getSession
in classRequest.Wrapper
- Parameters:
create
- True if the session should be created for the request.- Returns:
- The session associated with the request or
null
.
-