类 io.netty.handler.codec.ByteToMessageCodec 源码实例Demo

下面列出了怎么用 io.netty.handler.codec.ByteToMessageCodec 的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: reactor-netty   文件: HttpOperations.java

static void autoAddHttpExtractor(Connection c, String name, ChannelHandler handler){

		if (handler instanceof ByteToMessageDecoder
				|| handler instanceof ByteToMessageCodec
				|| handler instanceof CombinedChannelDuplexHandler) {
			String extractorName = name+"$extractor";

			if(c.channel().pipeline().context(extractorName) != null){
				return;
			}

			c.channel().pipeline().addBefore(name, extractorName, HTTP_EXTRACTOR);

			if(c.isPersistent()){
				c.onTerminate().subscribe(null, null, () -> c.removeHandler(extractorName));
			}

		}
	}
 
 类所在包
 类方法
 同包方法