code: protected ChannelHandler initHandlerAdapter(ChannelHandler init)
  	{
  		ChannelHandler handler=new ShareableChannelInboundHandler() {
  			@Override
  			public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
  				Channel ch=ctx.channel();
  				LogLevel level=getLevel();
  				if(level!=null)
  				{
  					ch.pipeline().addLast(new LoggerHandler(level));
  				}
  				ch.pipeline().addLast(init);
  				ctx.pipeline().remove(this);//移除当前handler
  				ctx.fireChannelRegistered();//从当前handler往后抛出事件
  			}
  		};
  //		ChannelHandler handler=new ChannelInitializer<Channel>() {
  //			@Override
  //			protected void initChannel(Channel ch) throws Exception {
  //				LogLevel level=getLevel();
  //				if(level!=null)
  //				{
  //					ch.pipeline().addLast(new LoggerHandler(level));
  //				}
  //				ch.pipeline().addLast(init);
  //			}
  //		};
  		/*
  		 * 如果init里面后续有ChannelInitializer则会触发2次channelRegistered
  		 * 导致LoggerHandler会打印2次channelRegistered无法避免,触发玩家自己的init不使用ChannelInitializer
  		ChannelInboundHandlerAdapter handler=new ChannelInboundHandlerAdapter(){
  			@Override
  			public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
  				ctx.pipeline().addLast(new LoggerHandler(getLevel()));
  				ctx.pipeline().addLast(init);
  				ctx.pipeline().remove(this);
  				super.channelRegistered(ctx);
  				
  			}
  		};
  		 */
  		return handler;
  	}
docs: 初始化handler适配包装
  @param init
  @return