Represents the state of an HTTP request/response cycle.
HttpChannel links the lower (closer to the network) layer HttpStream
with the upper (application code) layer Handler.
An HttpChannel instance may be used for many HTTP request/response cycles
from the same connection; however, only a single cycle may be active at any time.
Default implementations of this interface may be created via DefaultFactory.
| Modifier and Type | Class and Description |
|---|---|
| public static class | HttpChannel.
The factory that creates default implementations of |
| public static interface | HttpChannel.
A factory for |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpChannel | |
| public ComplianceViolation. | |
| public ConnectionMetaData | |
| public Request | Returns: theRequest object, or null if the Request object
is not yet available.Returns the |
| public void | |
| public boolean | |
| public Runnable | Returns: the lastRunnable passed to Request#demand(Runnable),
or null if there is no demand for content.
|
| public Runnable | |
| public Runnable | Returns: aRunnable that performs the timeout action, or null
if no action need be performed by the calling threadthe timeout. idleTimeout)Notifies this |
| public Runnable | onRequest(MetaData.
the HTTP request metadata. metaData
|
| public void | recycle()
Recycle the HttpChannel, so that a new cycle of calling |
| public void | setHttpStream(HttpStream
the httpStream)HttpStream to associate to this channel.Set the |
| from | back to summary |
|---|---|
public static HttpChannel from(Request request)
| |
| getComplianceViolationListener | back to summary |
|---|---|
public ComplianceViolation.
| |
| getConnectionMetaData | back to summary |
|---|---|
public ConnectionMetaData getConnectionMetaData()
| |
| getRequest | back to summary |
|---|---|
| public Request getRequest() Returns the The
| |
| initialize | back to summary |
|---|---|
| public void initialize() Initialize the HttpChannel when a new cycle of request handling begins.
| |
| isRequestHandled | back to summary |
|---|---|
public boolean isRequestHandled()
| |
| onContentAvailable | back to summary |
|---|---|
| public Runnable onContentAvailable()
| |
| onFailure | back to summary |
|---|---|
| public Runnable onFailure(Throwable failure) Notifies this Typical failure examples could be HTTP/2 resets or protocol failures (for example, invalid request bytes).
| |
| onIdleTimeout | back to summary |
|---|---|
| public Runnable onIdleTimeout(TimeoutException idleTimeout) Notifies this
| |
| onRequest | back to summary |
|---|---|
| public Runnable onRequest(MetaData.
The returned | |
| recycle | back to summary |
|---|---|
| public void recycle() Recycle the HttpChannel, so that a new cycle of calling
| |
| setHttpStream | back to summary |
|---|---|
| public void setHttpStream(HttpStream httpStream) Set the
| |
The factory that creates default implementations of HttpChannel.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public HttpChannel | newHttpChannel(ConnectionMetaData
the connectionMetaData)ConnectionMetaData associated with the channel.Implements org.
|
| DefaultFactory | back to summary |
|---|---|
| public DefaultFactory() | |
| newHttpChannel | back to summary |
|---|---|
| public HttpChannel newHttpChannel(ConnectionMetaData connectionMetaData) Implements org.
| |
A factory for HttpChannel instances.
DefaultFactory
| Modifier and Type | Method and Description |
|---|---|
| public HttpChannel | newHttpChannel(ConnectionMetaData
the connectionMetaData)ConnectionMetaData associated with the channel.Returns: a new |
| newHttpChannel | back to summary |
|---|---|
public HttpChannel newHttpChannel(ConnectionMetaData connectionMetaData)
| |