Top Description Fields Constructors Methods
io.vertx.core.http.impl

public Class Http1xOrH2CHandler

extends ChannelInboundHandlerAdapter
Class Inheritance
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.netty.channel.Channel, .ChannelHandlerContext, .ChannelInboundHandlerAdapter

Handler that detects whether the HTTP/2 connection preface or just process the request with the HTTP 1.x pipeline to support H2C with prior knowledge, i.e a client that connects and uses HTTP/2 in clear text directly without an HTTP upgrade.

Field Summary

Modifier and TypeField and Description
private int
public static final String
private static final byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected void
configure(ChannelHandlerContext ctx, boolean h2c)

private void
end(ChannelHandlerContext ctx, ByteBuf buf, boolean h2c)

public void
Inherited from io.netty.channel.ChannelInboundHandlerAdapter:
channelActivechannelInactivechannelReadCompletechannelRegisteredchannelUnregisteredchannelWritabilityChangeduserEventTriggered

Field Detail

currentback to summary
private int current
HTTP_2_PREFACEback to summary
public static final String HTTP_2_PREFACE
HTTP_2_PREFACE_ARRAYback to summary
private static final byte[] HTTP_2_PREFACE_ARRAY

Constructor Detail

Http1xOrH2CHandlerback to summary
public Http1xOrH2CHandler()

Method Detail

channelReadback to summary
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Implements io.netty.channel.ChannelInboundHandler.channelRead.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Calls ChannelHandlerContext#fireChannelRead(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
configureback to summary
protected void configure(ChannelHandlerContext ctx, boolean h2c)
endback to summary
private void end(ChannelHandlerContext ctx, ByteBuf buf, boolean h2c)
exceptionCaughtback to summary
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception

Overrides io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught.

Implements io.netty.channel.ChannelInboundHandler.exceptionCaught, io.netty.channel.ChannelHandler.exceptionCaught.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught.

Calls ChannelHandlerContext#fireExceptionCaught(Throwable) to forward to the next ChannelHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override