Class ServletContextRequest
java.lang.Object
org.eclipse.jetty.server.Request.Wrapper
org.eclipse.jetty.server.handler.ContextRequest
org.eclipse.jetty.ee10.servlet.ServletContextRequest
- All Implemented Interfaces:
ServletContextHandler.ServletRequestInfo,org.eclipse.jetty.io.Content.Source,org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Request.ServeAs,org.eclipse.jetty.util.Attributes,org.eclipse.jetty.util.thread.Invocable
public class ServletContextRequest
extends org.eclipse.jetty.server.handler.ContextRequest
implements ServletContextHandler.ServletRequestInfo, org.eclipse.jetty.server.Request.ServeAs
A core request wrapper that carries the servlet related request state,
which may be used directly by the associated
ServletApiRequest.
Non-servlet related state, is used indirectly via ServletChannel.getRequest()
which may be a wrapper of this request.
This class is single use only.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
org.eclipse.jetty.util.Attributes.Layer, org.eclipse.jetty.util.Attributes.Lazy, org.eclipse.jetty.util.Attributes.Mapped, org.eclipse.jetty.util.Attributes.SyntheticNested classes/interfaces inherited from interface org.eclipse.jetty.io.Content.Source
org.eclipse.jetty.io.Content.Source.FactoryNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
org.eclipse.jetty.util.thread.Invocable.Callable, org.eclipse.jetty.util.thread.Invocable.InvocationType, org.eclipse.jetty.util.thread.Invocable.ReadyTask, org.eclipse.jetty.util.thread.Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.server.Request
org.eclipse.jetty.server.Request.AttributesWrapper, org.eclipse.jetty.server.Request.AuthenticationState, org.eclipse.jetty.server.Request.Handler, org.eclipse.jetty.server.Request.ServeAs, org.eclipse.jetty.server.Request.Wrapper -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.eclipse.jetty.util.Attributes
NULLFields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOPFields inherited from interface org.eclipse.jetty.server.Request
COOKIE_ATTRIBUTE, DEFAULT_LOCALES, LOG -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServletContextRequest(ServletContextHandler.ServletContextApi servletContextApi, ServletChannel servletChannel, org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, String decodedPathInContext, org.eclipse.jetty.http.pathmap.MatchedResource<ServletHandler.MappedServlet> matchedResource, org.eclipse.jetty.session.SessionManager sessionManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(EventListener listener) voidgetAttribute(String name) jakarta.servlet.http.HttpServletResponseorg.eclipse.jetty.session.ManagedSessionorg.eclipse.jetty.http.pathmap.MatchedResource<ServletHandler.MappedServlet> List<jakarta.servlet.ServletRequestAttributeListener> org.eclipse.jetty.session.AbstractSessionManager.RequestedSessionstatic ServletContextRequestgetServletContextRequest(jakarta.servlet.ServletRequest request) org.eclipse.jetty.server.SessiongetSession(boolean create) org.eclipse.jetty.session.SessionManagergetState()org.eclipse.jetty.http.HttpFieldsbooleanisHead()protected ServletApiRequestprotected ServletContextResponsenewServletContextResponse(org.eclipse.jetty.server.Response response) removeAttribute(String name) voidremoveEventListener(EventListener listener) setAttribute(String name, Object value) voidsetManagedSession(org.eclipse.jetty.session.ManagedSession managedSession) voidsetQueryEncoding(String queryEncoding) Set the character encoding used for the query string.voidsetRequestedSession(org.eclipse.jetty.session.AbstractSessionManager.RequestedSession requestedSession) org.eclipse.jetty.server.Requestwrap(org.eclipse.jetty.server.Request request, org.eclipse.jetty.http.HttpURI uri) Methods inherited from class org.eclipse.jetty.server.handler.ContextRequest
addFailureListener, addIdleTimeoutListener, demand, getContextMethods inherited from class org.eclipse.jetty.server.Request.Wrapper
addHttpStreamWrapper, asAttributeMap, clearAttributes, consumeAvailable, fail, getBeginNanoTime, getComponents, getConnectionMetaData, getHeaders, getHeadersNanoTime, getHttpURI, getId, getLength, getMethod, getTunnelSupport, getWrapped, isSecure, push, read, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap, clearAttributes, equals, hashCodeMethods inherited from interface org.eclipse.jetty.io.Content.Source
fail, fail, getLength, rewindMethods inherited from interface org.eclipse.jetty.util.thread.Invocable
getInvocationTypeMethods inherited from interface org.eclipse.jetty.server.Request
addFailureListener, addHttpStreamWrapper, addIdleTimeoutListener, consumeAvailable, demand, getBeginNanoTime, getComponents, getConnectionMetaData, getContext, getHeaders, getHeadersNanoTime, getHttpURI, getId, getMethod, getTunnelSupport, isSecure, push, readMethods inherited from interface org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletRequestInfo
getRequest
-
Field Details
-
MULTIPART_CONFIG_ELEMENT
- See Also:
-
SSL_CIPHER_SUITE
- See Also:
-
SSL_KEY_SIZE
- See Also:
-
SSL_SESSION_ID
- See Also:
-
PEER_CERTIFICATES
- See Also:
-
-
Constructor Details
-
ServletContextRequest
protected ServletContextRequest(ServletContextHandler.ServletContextApi servletContextApi, ServletChannel servletChannel, org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, String decodedPathInContext, org.eclipse.jetty.http.pathmap.MatchedResource<ServletHandler.MappedServlet> matchedResource, org.eclipse.jetty.session.SessionManager sessionManager)
-
-
Method Details
-
getServletContextRequest
public static ServletContextRequest getServletContextRequest(jakarta.servlet.ServletRequest request) -
wrap
public org.eclipse.jetty.server.Request wrap(org.eclipse.jetty.server.Request request, org.eclipse.jetty.http.HttpURI uri) - Specified by:
wrapin interfaceorg.eclipse.jetty.server.Request.ServeAs
-
newServletApiRequest
-
newServletContextResponse
protected ServletContextResponse newServletContextResponse(org.eclipse.jetty.server.Response response) -
getServletContextHandler
- Specified by:
getServletContextHandlerin interfaceServletContextHandler.ServletRequestInfo
-
getDecodedPathInContext
- Specified by:
getDecodedPathInContextin interfaceServletContextHandler.ServletRequestInfo
-
getMatchedResource
public org.eclipse.jetty.http.pathmap.MatchedResource<ServletHandler.MappedServlet> getMatchedResource()- Specified by:
getMatchedResourcein interfaceServletContextHandler.ServletRequestInfo
-
getTrailers
public org.eclipse.jetty.http.HttpFields getTrailers()- Specified by:
getTrailersin interfaceorg.eclipse.jetty.server.Request- Overrides:
getTrailersin classorg.eclipse.jetty.server.Request.Wrapper
-
getState
- Specified by:
getStatein interfaceServletContextHandler.ServletRequestInfo
-
getServletContextResponse
-
getServletContext
- Specified by:
getServletContextin interfaceServletContextHandler.ServletRequestInfo
-
getHttpInput
- Specified by:
getHttpInputin interfaceServletContextHandler.ServletRequestInfo
-
getHttpOutput
-
errorClose
public void errorClose() -
isHead
public boolean isHead() -
setQueryEncoding
Set the character encoding used for the query string. This call will effect the return of getQueryString and getParamaters. It must be called before any getParameter methods.The request attribute "org.eclipse.jetty.server.Request.queryEncoding" may be set as an alternate method of calling setQueryEncoding.
- Specified by:
setQueryEncodingin interfaceServletContextHandler.ServletRequestInfo- Parameters:
queryEncoding- the URI query character encoding
-
getQueryEncoding
- Specified by:
getQueryEncodingin interfaceServletContextHandler.ServletRequestInfo
-
getAttribute
-
removeAttribute
-
setAttribute
-
getAttributeNameSet
-
getErrorContext
- Returns:
- The current
contextused for this error handling for this request. If the request is asynchronous, then it is the context that called async. Otherwise, it is the last non-null context passed to #setContext
-
getServletRequestState
- Specified by:
getServletRequestStatein interfaceServletContextHandler.ServletRequestInfo
-
getServletChannel
- Specified by:
getServletChannelin interfaceServletContextHandler.ServletRequestInfo
-
getServletApiRequest
-
getHttpServletResponse
public jakarta.servlet.http.HttpServletResponse getHttpServletResponse() -
getServletName
-
getRequestAttributeListeners
- Specified by:
getRequestAttributeListenersin interfaceServletContextHandler.ServletRequestInfo
-
addEventListener
-
removeEventListener
-
getManagedSession
public org.eclipse.jetty.session.ManagedSession getManagedSession()- Specified by:
getManagedSessionin interfaceServletContextHandler.ServletRequestInfo
-
setManagedSession
public void setManagedSession(org.eclipse.jetty.session.ManagedSession managedSession) -
getSessionManager
public org.eclipse.jetty.session.SessionManager getSessionManager()- Specified by:
getSessionManagerin interfaceServletContextHandler.ServletRequestInfo
-
setRequestedSession
public void setRequestedSession(org.eclipse.jetty.session.AbstractSessionManager.RequestedSession requestedSession) -
getRequestedSession
public org.eclipse.jetty.session.AbstractSessionManager.RequestedSession getRequestedSession()- Specified by:
getRequestedSessionin interfaceServletContextHandler.ServletRequestInfo
-
getSession
public org.eclipse.jetty.server.Session getSession(boolean create) - Specified by:
getSessionin interfaceorg.eclipse.jetty.server.Request- Overrides:
getSessionin classorg.eclipse.jetty.server.Request.Wrapper
-