Top Description Fields Constructors Methods
io.undertow.server.protocol.http2

public Class Http2ReceiveListener

extends Object
implements ChannelListener<Http2Channel>
Class Inheritance
All Implemented Interfaces
org.xnio.ChannelListener, java.util.EventListener
Imports
java.io.IOException, java.nio.ByteBuffer, java.nio.charset.StandardCharsets, java.util.function.Supplier, javax.net.ssl.SSLSession, io.undertow.UndertowLogger, .UndertowOptions, io.undertow.conduits.HeadStreamSinkConduit, io.undertow.protocols.http2.AbstractHttp2StreamSourceChannel, .Http2Channel, .Http2DataStreamSinkChannel, .Http2HeadersStreamSinkChannel, .Http2StreamSourceChannel, io.undertow.server.ConduitWrapper, .ConnectorStatisticsImpl, .Connectors, .HttpHandler, .HttpServerExchange, io.undertow.server.protocol.http.HttpAttachments, .HttpContinue, .HttpRequestParser, io.undertow.util.ConduitFactory, .HeaderMap, .HeaderValues, .Headers, .ImmediatePooledByteBuffer, .Methods, .ParameterLimitException, .Protocols, .StatusCodes, .URLUtils, org.xnio.ChannelListener, .IoUtils, .OptionMap, org.xnio.channels.Channels, org.xnio.conduits.StreamSinkConduit

The recieve listener for a Http2 connection.

A new instance is created per connection.

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final boolean
private final int
private final ConnectorStatisticsImpl
private final boolean
private final StringBuilder
private final String
private final long
private final int
private final boolean
private final HttpHandler
private final boolean
private final OptionMap

Constructor Summary

AccessConstructor and Description
public
Http2ReceiveListener(HttpHandler rootHandler, OptionMap undertowOptions, int bufferSize, ConnectorStatisticsImpl connectorStatistics)

Method Summary

Modifier and TypeMethod and Description
private boolean

Returns:

true if check was successful, false otherwise
checkRequestHeaders
(HeaderMap
map of the request headers
headers
)

Performs HTTP2 specification compliance check for headers and pseudo-headers of a current request.

private void
public void
handleEvent(Http2Channel
the channel event
channel
)

Implements org.xnio.ChannelListener.handleEvent.

Handle the event on this channel.

pack-priv void
handleInitialRequest(HttpServerExchange
The initial upgrade request that started the HTTP2 connection
initial
,
Http2Channel channel, byte[] data)

Handles the initial request when the exchange was started by a HTTP upgrade.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowUnescapedCharactersInUrlback to summary
private final boolean allowUnescapedCharactersInUrl
bufferSizeback to summary
private final int bufferSize
connectorStatisticsback to summary
private final ConnectorStatisticsImpl connectorStatistics
decodeback to summary
private final boolean decode
decodeBufferback to summary
private final StringBuilder decodeBuffer
encodingback to summary
private final String encoding
maxEntitySizeback to summary
private final long maxEntitySize
maxParametersback to summary
private final int maxParameters
recordRequestStartTimeback to summary
private final boolean recordRequestStartTime
rootHandlerback to summary
private final HttpHandler rootHandler
slashDecodingFlagback to summary
private final boolean slashDecodingFlag
undertowOptionsback to summary
private final OptionMap undertowOptions

Constructor Detail

Http2ReceiveListenerback to summary
public Http2ReceiveListener(HttpHandler rootHandler, OptionMap undertowOptions, int bufferSize, ConnectorStatisticsImpl connectorStatistics)

Method Detail

checkRequestHeadersback to summary
private boolean checkRequestHeaders(HeaderMap headers)

Performs HTTP2 specification compliance check for headers and pseudo-headers of a current request.

Parameters
headers:HeaderMap

map of the request headers

Returns:boolean

true if check was successful, false otherwise

handleCommonSetupback to summary
private void handleCommonSetup(Http2HeadersStreamSinkChannel sink, HttpServerExchange exchange, Http2ServerConnection connection)
handleEventback to summary
public void handleEvent(Http2Channel channel)

Implements org.xnio.ChannelListener.handleEvent.

Doc from org.xnio.ChannelListener.handleEvent.

Handle the event on this channel.

Parameters
channel:Http2Channel

the channel event

Annotations
@Override
handleInitialRequestback to summary
pack-priv void handleInitialRequest(HttpServerExchange initial, Http2Channel channel, byte[] data)

Handles the initial request when the exchange was started by a HTTP upgrade.

Parameters
initial:HttpServerExchange

The initial upgrade request that started the HTTP2 connection

handleRequestsback to summary
private void handleRequests(Http2Channel channel, Http2StreamSourceChannel frame)