ApplicationProtocolNegotiationHandler instead.public abstract class SpdyOrHttpChooser extends ByteToMessageDecoder
| 限定符和类型 | 类和说明 | 
|---|---|
static class  | 
SpdyOrHttpChooser.SelectedProtocol
已过时。  
  | 
ByteToMessageDecoder.CumulatorChannelHandler.SharableCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| 限定符 | 构造器和说明 | 
|---|---|
protected  | 
SpdyOrHttpChooser()
已过时。  
  | 
| 限定符和类型 | 方法和说明 | 
|---|---|
protected abstract void | 
configureHttp1(ChannelHandlerContext ctx)
已过时。  
Configures the  
Channel of the specified ctx for HTTP/1. | 
protected abstract void | 
configureSpdy(ChannelHandlerContext ctx,
             SpdyVersion version)
已过时。  
Configures the  
Channel of the specified ctx for HTTP/2. | 
protected void | 
decode(ChannelHandlerContext ctx,
      ByteBuf in,
      java.util.List<java.lang.Object> out)
已过时。  
Decode the from one  
ByteBuf to an other. | 
void | 
exceptionCaught(ChannelHandlerContext ctx,
               java.lang.Throwable cause)
已过时。  
Calls  
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
 to the next ChannelHandler in the ChannelPipeline. | 
protected SpdyOrHttpChooser.SelectedProtocol | 
selectProtocol(SslHandler sslHandler)
已过时。  
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 在类中 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 在接口中 ChannelHandlerexceptionCaught 在接口中 ChannelInboundHandlerexceptionCaught 在类中 ChannelInboundHandlerAdapterjava.lang.Exception