ApplicationProtocolNegotiationHandler instead.public abstract class SpdyOrHttpChooser extends ByteToMessageDecoder
| Modifier and Type | Class and Description |
|---|---|
static class |
SpdyOrHttpChooser.SelectedProtocol
Deprecated.
|
ByteToMessageDecoder.CumulatorChannelHandler.SharableCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| Modifier | Constructor and Description |
|---|---|
protected |
SpdyOrHttpChooser()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
configureHttp1(ChannelHandlerContext ctx)
Deprecated.
Configures the
Channel of the specified ctx for HTTP/1. |
protected abstract void |
configureSpdy(ChannelHandlerContext ctx,
SpdyVersion version)
Deprecated.
Configures the
Channel of the specified ctx for HTTP/2. |
protected void |
decode(ChannelHandlerContext ctx,
ByteBuf in,
java.util.List<java.lang.Object> out)
Deprecated.
Decode the from one
ByteBuf to an other. |
void |
exceptionCaught(ChannelHandlerContext ctx,
java.lang.Throwable cause)
Deprecated.
Calls
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline. |
protected SpdyOrHttpChooser.SelectedProtocol |
selectProtocol(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, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChangedensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAddedprotected void decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception
ByteToMessageDecoderByteBuf to an other. This method will be called till either the input
ByteBuf has nothing to read when return from this method or till nothing was read from the input
ByteBuf.decode in class ByteToMessageDecoderctx - the ChannelHandlerContext which this ByteToMessageDecoder belongs toin - the ByteBuf from which to read dataout - the List to which decoded messages should be addedjava.lang.Exception - is thrown if an error occursprotected SpdyOrHttpChooser.SelectedProtocol selectProtocol(SslHandler sslHandler) throws java.lang.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"java.lang.Exceptionprotected abstract void configureSpdy(ChannelHandlerContext ctx, SpdyVersion version) throws java.lang.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());
java.lang.Exceptionprotected abstract void configureHttp1(ChannelHandlerContext ctx) throws java.lang.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());
java.lang.Exceptionpublic void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
ChannelInboundHandlerAdapterChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.exceptionCaught in interface ChannelHandlerexceptionCaught in interface ChannelInboundHandlerexceptionCaught in class ChannelInboundHandlerAdapterjava.lang.ExceptionCopyright © 2008–2018 The Netty Project. All rights reserved.