| Modifier and Type | Field and Description |
|---|---|
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | failAndClose(Throwable failure)
Implements abstract org. Fails the receiver and closes the underlying stream. |
| protected HttpChannelOverHTTP3 | |
| public void | onDataAvailable(Stream.
Overrides default org. Callback method invoked if the application has expressed
|
| public void | onFailure(Stream.
Overrides default org. Callback method invoked when a stream failure occurred. |
| public void | onIdleTimeout(Stream.
Overrides default org. Callback method invoked when the stream idle timeout elapses. |
| protected void | onInterim()
Implements abstract org. Prepare for the next step after an interim response was read. |
| public void | onNewStream(Stream.
Overrides default org. Callback method invoked when a stream is created locally by
|
| public void | onResponse(Stream.
Overrides default org. Callback method invoked when a response is received. |
| public void | onTrailer(Stream.
Overrides default org. Callback method invoked when a trailer is received. |
| public Content. | read(boolean fillInterestIfNeeded)
Implements abstract org. Reads a chunk of data. |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| HttpReceiverOverHTTP3 | back to summary |
|---|---|
| protected HttpReceiverOverHTTP3(HttpChannelOverHTTP3 channel) | |
| failAndClose | back to summary |
|---|---|
| public void failAndClose(Throwable failure) Implements abstract org. Doc from org. Fails the receiver and closes the underlying stream.
| |
| getHttpChannel | back to summary |
|---|---|
| protected HttpChannelOverHTTP3 getHttpChannel() Overrides org.
| |
| onDataAvailable | back to summary |
|---|---|
| public void onDataAvailable(Stream. Overrides default org. Doc from org. Callback method invoked if the application has expressed
A server application that wishes to handle request content
should typically call A client application that wishes to handle response content
should typically call Just prior calling this method, the outstanding demand is
cancelled; applications that implement this method should read
content calling Only one thread at a time invokes this method, although it may not be the same thread across different invocations. It is always guaranteed that invoking Typical usage:
class MyStreamListener implements Stream.Client.Listener
{
@Override
public void onDataAvailable(Stream.Client stream)
{
// Read a chunk of the content.
Stream.Data data = stream.readData();
if (data == null)
{
// No data available now, demand to be called back.
stream.demand();
}
else
{
// Process the content.
process(data.getByteBuffer());
// Notify that the content has been consumed.
data.release();
if (!data.isLast())
{
// Demand to be called back.
stream.demand();
}
}
}
}
| |
| onFailure | back to summary |
|---|---|
| public void onFailure(Stream. Overrides default org. Doc from org. Callback method invoked when a stream failure occurred. Typical stream failures, among others, are failures to decode a HEADERS frame, or failures to read bytes because the stream has been reset.
| |
| onIdleTimeout | back to summary |
|---|---|
| public void onIdleTimeout(Stream. Overrides default org. Doc from org. Callback method invoked when the stream idle timeout elapses.
| |
| onInterim | back to summary |
|---|---|
| protected void onInterim() Implements abstract org. Doc from org. Prepare for the next step after an interim response was read.
| |
| onNewStream | back to summary |
|---|---|
| public void onNewStream(Stream. Overrides default org. Doc from org. Callback method invoked when a stream is created locally by
| |
| onResponse | back to summary |
|---|---|
| public void onResponse(Stream. Overrides default org. Doc from org. Callback method invoked when a response is received. To read response content, applications should call
| |
| onTrailer | back to summary |
|---|---|
| public void onTrailer(Stream. Overrides default org. Doc from org. Callback method invoked when a trailer is received.
| |
| read | back to summary |
|---|---|
| public Content. Implements abstract org. Doc from org. Reads a chunk of data.
If no data was read,
The returned chunk of data may be the last one or an error exactly like
| |