| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| HTTP3ServerConnectionFactory | back to summary |
|---|---|
| public HTTP3ServerConnectionFactory() | |
| HTTP3ServerConnectionFactory | back to summary |
|---|---|
| public HTTP3ServerConnectionFactory(HttpConfiguration configuration) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | onFailure(Session session, long error, String reason, Throwable failure)
Overrides default org. Callback method invoked when a failure has been detected for this session. |
| public boolean | onIdleTimeout(Session session)
Overrides default org. Callback method invoked when the idle timeout has expired. |
| public Stream. | onRequest(Stream.
Overrides default org. Callback method invoked when a request is received. |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| HTTP3SessionListener | back to summary |
|---|---|
| private HTTP3SessionListener() | |
| onFailure | back to summary |
|---|---|
| public void onFailure(Session session, long error, String reason, Throwable failure) Overrides default org. Doc from org. Callback method invoked when a failure has been detected for this session.
| |
| onIdleTimeout | back to summary |
|---|---|
| public boolean onIdleTimeout(Session session) Overrides default org. Doc from org. Callback method invoked when the idle timeout has expired.
| |
| onRequest | back to summary |
|---|---|
| public Stream. Overrides default org. Doc from org. Callback method invoked when a request is received. Applications should implement this method to process HTTP/3 requests,
typically providing an HTTP/3 response via
class MyServer implements Session.Server.Listener
{
@Override
public Stream.Server.Listener onRequest(Stream.Server stream, HeadersFrame frame)
{
// Send a response.
var response = new MetaData.Response(HttpVersion.HTTP_3, HttpStatus.OK_200, HttpFields.EMPTY);
stream.respond(new HeadersFrame(response, true));
if (!frame.isLast())
stream.demand();
return null;
}
}
If there is request content (indicated by the fact that the HEADERS frame is not the last in the stream), then applications either:
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private ServerHTTP3StreamConnection | |
| 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. |
| public void | |
| public void | onTrailer(Stream.
Overrides default org. Callback method invoked when a trailer is received. |
| endPoint | back to summary |
|---|---|
| private final EndPoint endPoint | |
| HTTP3StreamListener | back to summary |
|---|---|
| public HTTP3StreamListener(EndPoint endPoint) | |
| getConnection | back to summary |
|---|---|
| private ServerHTTP3StreamConnection getConnection() | |
| 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.Server.Listener
{
@Override
public void onDataAvailable(Stream.Server 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.
| |
| onRequest | back to summary |
|---|---|
| public void onRequest(Stream stream, HeadersFrame frame) | |
| onTrailer | back to summary |
|---|---|
| public void onTrailer(Stream. Overrides default org. Doc from org. Callback method invoked when a trailer is received.
| |