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

public Class Http2UpgradeHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
java.io.ByteArrayOutputStream, .IOException, java.nio.ByteBuffer, java.util.Arrays, .Collections, .HashSet, .Set, org.xnio.OptionMap, .StreamConnection, io.undertow.UndertowLogger, .UndertowOptions, io.undertow.io.IoCallback, .Receiver, .Sender, io.undertow.protocols.http2.Http2Channel, io.undertow.server.Connectors, .HttpHandler, .HttpServerExchange, .HttpUpgradeListener, io.undertow.server.protocol.http.HttpContinue, io.undertow.util.FlexBase64, .Headers, .ImmediatePooledByteBuffer, .Protocols, .StatusCodes

Upgrade listener for HTTP2, this allows connections to be established using the upgrade mechanism as detailed in Section 3.2. This should always be the first handler in a handler chain.
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final HttpHandler
private final Set<String>

Constructor Summary

AccessConstructor and Description
public
public
Http2UpgradeHandler(HttpHandler next, String... upgradeStrings)

Method Summary

Modifier and TypeMethod and Description
private void
handleHttp2Upgrade(HttpServerExchange exchange, final String upgrade, String settings, final byte[] data)

public void
handleRequest(HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

private void
handleUpgradeBody(HttpServerExchange exchange, String upgrade, String settings)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nextback to summary
private final HttpHandler next
upgradeStringsback to summary
private final Set<String> upgradeStrings

Constructor Detail

Http2UpgradeHandlerback to summary
public Http2UpgradeHandler(HttpHandler next)
Http2UpgradeHandlerback to summary
public Http2UpgradeHandler(HttpHandler next, String... upgradeStrings)

Method Detail

handleHttp2Upgradeback to summary
private void handleHttp2Upgrade(HttpServerExchange exchange, final String upgrade, String settings, final byte[] data) throws IOException
handleRequestback to summary
public void handleRequest(HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override
handleUpgradeBodyback to summary
private void handleUpgradeBody(HttpServerExchange exchange, String upgrade, String settings) throws Exception