jakarta.servlet.ServletRequest as a core Request.
Whilst similar to a Request., this class is not a Wrapper
as callers should not be able to access Wrapper#getWrapped() and bypass
the jakarta..
The current implementation does not support any read operations.
| Modifier and Type | Field and Description |
|---|---|
| private final HttpFields | |
| private final ServletContextRequest | |
| private final HttpServletRequest | |
| private final HttpURI |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addFailureListener(Consumer<Throwable>
the failure listener as a consumer function onFailure)Implements org. Adds a listener for asynchronous fatal failures. |
| public void | addHttpStreamWrapper(Function<HttpStream, HttpStream>
A function that wraps the passed stream. wrapper)Implements org. HttpStream. to the current HttpStream.
|
| public void | addIdleTimeoutListener(Predicate<TimeoutException>
the idle timeout listener as a predicate function onIdleTimeout)Implements org. Adds a listener for idle timeouts. |
| public void | clearAttributes()
Overrides default org. |
| public boolean | consumeAvailable()
Implements org. |
| public void | demand(Runnable
the demand callback to invoke when there is a content chunk available. demandCallback)Implements org. Demands to invoke the given demand callback parameter when a chunk of content is available. |
| public void | fail(Throwable
the cause of the failure failure)Implements org. Fails this content source with a |
| public Object | getAttribute(String
the attribute to get name)Implements org. |
| public Set | getAttributeNameSet()
Implements org. |
| public long | getBeginNanoTime()
Implements org. Get the nanoTime at which the request arrived to a connector, obtained via |
| public Components | |
| public ConnectionMetaData | |
| public Context | getContext()
Implements org. Context associated with this Request.
|
| public HttpFields | |
| public long | getHeadersNanoTime()
Implements org. Get the nanoTime at which the request headers were parsed, obtained via |
| public HttpURI | |
| public String | getId()
Implements org. ConnectionMetaData#getId()).
|
| public String | |
| public HttpServletRequest | |
| public Session | getSession(boolean
True if the session should be created for the request. create)Implements org. Get a |
| public HttpFields | |
| public TunnelSupport | |
| public boolean | |
| public Content. | |
| public Object | removeAttribute(String
the attribute to remove name)Implements org. |
| public Object | setAttribute(String
the attribute to set name, Object the value to set. A null value is equivalent to removing the attribute. attribute)Implements org. |
| _httpFields | back to summary |
|---|---|
| private final HttpFields _httpFields | |
| _servletContextRequest | back to summary |
|---|---|
| private final ServletContextRequest _servletContextRequest | |
| _servletRequest | back to summary |
|---|---|
| private final HttpServletRequest _servletRequest | |
| _uri | back to summary |
|---|---|
| private final HttpURI _uri | |
| ServletCoreRequest | back to summary |
|---|---|
| pack-priv ServletCoreRequest(HttpServletRequest request) | |
| addFailureListener | back to summary |
|---|---|
| public void addFailureListener(Consumer<Throwable> onFailure) Implements org. Doc from org. Adds a listener for asynchronous fatal failures. When a listener is called, the effects of the failure have already taken place:
Listeners are processed in the same order they are added. | |
| addHttpStreamWrapper | back to summary |
|---|---|
| public void addHttpStreamWrapper(Function<HttpStream, HttpStream> wrapper) Implements org. Doc from org. Add a
| |
| addIdleTimeoutListener | back to summary |
|---|---|
| public void addIdleTimeoutListener(Predicate<TimeoutException> onIdleTimeout) Implements org. Doc from org. Adds a listener for idle timeouts. The listener is a predicate function that should return Idle timeout listeners are only invoked if there are no pending
Listeners are processed in the same order they are added, and the first that
returns
| |
| clearAttributes | back to summary |
|---|---|
| public void clearAttributes() Overrides default org. Doc from org. Clear all attribute names
| |
| consumeAvailable | back to summary |
|---|---|
| public boolean consumeAvailable() Implements org. Doc from org. Consume any available content. This bypasses any request wrappers to process the content in
| |
| demand | back to summary |
|---|---|
| public void demand(Runnable demandCallback) Implements org. Doc from org. Demands to invoke the given demand callback parameter when a chunk of content is available. See how to use this method idiomatically. Implementations guarantee that calls to this method are safely reentrant so that
stack overflows are avoided in the case of mutual recursion between the execution of
the The demand callback may be invoked spuriously: a subsequent call to Calling this method establishes a pending demand, which is fulfilled when the demand callback is invoked. Calling this method when there is already a pending demand results in an
If the invocation of the demand callback throws an exception, then | |
| fail | back to summary |
|---|---|
| public void fail(Throwable failure) Implements org. Doc from org. Fails this content source with a The failure may be notified to the content reader at a later time, when
the content reader reads a content chunk, via a If Typical failure: the content being aborted by user code, or idle timeouts. If this method has already been called, then it is a no operation. | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) Implements org. Doc from org. Get an attribute | |
| getAttributeNameSet | back to summary |
|---|---|
| public Set Implements org. Doc from org. Get the immutable set of attribute names. | |
| getBeginNanoTime | back to summary |
|---|---|
| public long getBeginNanoTime() Implements org. Doc from org. Get the nanoTime at which the request arrived to a connector, obtained via
| |
| getComponents | back to summary |
|---|---|
| public Components getComponents() Implements org.
| |
| getConnectionMetaData | back to summary |
|---|---|
| public ConnectionMetaData getConnectionMetaData() Implements org.
| |
| getContext | back to summary |
|---|---|
| public Context getContext() Implements org. Doc from org. Get the Note that a | |
| getHeaders | back to summary |
|---|---|
| public HttpFields getHeaders() Implements org.
| |
| getHeadersNanoTime | back to summary |
|---|---|
| public long getHeadersNanoTime() Implements org. Doc from org. Get the nanoTime at which the request headers were parsed, obtained via
| |
| getHttpURI | back to summary |
|---|---|
| public HttpURI getHttpURI() Implements org.
| |
| getId | back to summary |
|---|---|
| public String getId() Implements org. Doc from org. an ID unique within the lifetime scope of the
| |
| getMethod | back to summary |
|---|---|
| public String getMethod() Implements org.
| |
| getServletRequest | back to summary |
|---|---|
| public HttpServletRequest getServletRequest() | |
| getSession | back to summary |
|---|---|
| public Session getSession(boolean create) Implements org. Doc from org. Get a | |
| getTrailers | back to summary |
|---|---|
| public HttpFields getTrailers() Implements org.
| |
| getTunnelSupport | back to summary |
|---|---|
| public TunnelSupport getTunnelSupport() Implements org.
| |
| isSecure | back to summary |
|---|---|
| public boolean isSecure() Implements org.
| |
| read | back to summary |
|---|---|
| public Content. Implements org. Doc from org. Reads a chunk of content. See how to use this method idiomatically. The returned chunk could be:
Once a read returns an Once a read returns a The content reader code must ultimately arrange for a call to
Additionally, prior to the ultimate call to Concurrent reads from different threads are not recommended, as they are inherently in a race condition. Reads performed outside the invocation context of a
In addition, the returned
| |
| removeAttribute | back to summary |
|---|---|
| public Object removeAttribute(String name) Implements org. Doc from org. Remove an attribute | |
| setAttribute | back to summary |
|---|---|
| public Object setAttribute(String name, Object attribute) Implements org. Doc from org. Set an attribute | |