ApplicationProtocolNegotiationHandler instead.public abstract class SpdyOrHttpChooser
extends io.netty.handler.codec.ByteToMessageDecoder
| Modifier and Type | Class and Description |
|---|---|
static class |
SpdyOrHttpChooser.SelectedProtocol
Deprecated.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SpdyOrHttpChooser()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
configureHttp1(io.netty.channel.ChannelHandlerContext ctx)
Deprecated.
Configures the
Channel of the specified ctx for HTTP/1. |
protected abstract void |
configureSpdy(io.netty.channel.ChannelHandlerContext ctx,
SpdyVersion version)
Deprecated.
Configures the
Channel of the specified ctx for HTTP/2. |
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out)
Deprecated.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
Deprecated.
|
protected SpdyOrHttpChooser.SelectedProtocol |
selectProtocol(io.netty.handler.ssl.SslHandler sslHandler)
Deprecated.
Returns the
SpdyOrHttpChooser.SelectedProtocol for the current SSL session. |
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecodechannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredprotected void decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out)
throws Exception
decode in class io.netty.handler.codec.ByteToMessageDecoderExceptionprotected SpdyOrHttpChooser.SelectedProtocol selectProtocol(io.netty.handler.ssl.SslHandler sslHandler) throws Exception
SpdyOrHttpChooser.SelectedProtocol for the current SSL session. By default, this method returns the first
known protocol.null if the application-level protocol name of
the specified sslHandler is neither "http/1.1", "http/1.0" nor "spdy/3.1"Exceptionprotected abstract void configureSpdy(io.netty.channel.ChannelHandlerContext ctx,
SpdyVersion version)
throws Exception
Channel of the specified ctx for HTTP/2.
A typical implementation of this method will look like the following:
ChannelPipelinep = ctx.pipeline(); p.addLast(newSpdyFrameCodec(version)); p.addLast(newSpdySessionHandler(version, true)); p.addLast(newSpdyHttpEncoder(version)); p.addLast(newSpdyHttpDecoder(version, maxSpdyContentLength)); p.addLast(newSpdyHttpResponseStreamIdHandler()); p.addLast(new YourHttpRequestHandler());
Exceptionprotected abstract void configureHttp1(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Channel of the specified ctx for HTTP/1.
A typical implementation of this method will look like the following:
ChannelPipelinep = ctx.pipeline(); p.addLast(newHttpServerCodec()); p.addLast(new YourHttpRequestHandler());
Exceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2008–2015 The Netty Project. All rights reserved.