@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { assert ctx == inboundCtx.ctx; if (!inboundCtx.removed) { inboundHandler.channelRead(inboundCtx, msg); } else { inboundCtx.fireChannelRead(msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { assert ctx == inboundCtx.ctx; if (!inboundCtx.removed) { inboundHandler.channelRead(inboundCtx, msg); } else { inboundCtx.fireChannelRead(msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { assert ctx == inboundCtx.ctx; if (!inboundCtx.removed) { inboundHandler.channelRead(inboundCtx, msg); } else { inboundCtx.fireChannelRead(msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof NetworkMessage) { NetworkMessage nm = (NetworkMessage) msg; handler.channelRead(new WrapperContext(ctx, nm.getRemoteAddress()), nm.getMessage()); } else { handler.channelRead(ctx, msg); } }
private void invokeChannelRead(Object msg) { if (invokeHandler()) { try { ((ChannelInboundHandler) handler()).channelRead(this, msg); } catch (Throwable t) { notifyHandlerException(t); } } else { fireChannelRead(msg); } }
@Override protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception { if (msg.isReadable()) { // "Dynamically manipulating a pipeline is relatively an expensive operation." // https://stackoverflow.com/a/28846565 if (handler == null) { if (usesOctetCountFraming(msg)) { handler = new SyslogOctetCountFrameDecoder(); } else { handler = new DelimiterBasedFrameDecoder(maxFrameLength, delimiter); } } handler.channelRead(ctx, ReferenceCountUtil.retain(msg)); } else { ctx.fireChannelRead(msg); } }
private void invokeChannelRead(Object msg) { if (invokeHandler()) { try { ((ChannelInboundHandler) handler()).channelRead(this, msg); } catch (Throwable t) { notifyHandlerException(t); } } else { fireChannelRead(msg); } }
private void invokeChannelRead(Object msg) { if (invokeHandler()) { try { ((ChannelInboundHandler) handler()).channelRead(this, msg); } catch (Throwable t) { notifyHandlerException(t); } } else { fireChannelRead(msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { assert ctx == inboundCtx.ctx; if (!inboundCtx.removed) { inboundHandler.channelRead(inboundCtx, msg); } else { inboundCtx.fireChannelRead(msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { assert ctx == inboundCtx.ctx; if (!inboundCtx.removed) { inboundHandler.channelRead(inboundCtx, msg); } else { inboundCtx.fireChannelRead(msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { assert ctx == inboundCtx.ctx; if (!inboundCtx.removed) { inboundHandler.channelRead(inboundCtx, msg); } else { inboundCtx.fireChannelRead(msg); } }
@Override public void channelRead( ChannelHandlerContext ctx, Object msg ) throws Exception { ChannelInboundHandler delegate = protocol.select( decoders ); if ( delegate == null ) { log.warn( "Unregistered handler for protocol %s", protocol ); return; } delegate.channelRead( ctx, msg ); }
@Override public void channelRead( ChannelHandlerContext ctx, Object msg ) throws Exception { ChannelInboundHandler delegate = protocol.select( decoders ); if ( delegate == null ) { log.warn( "Unregistered handler for protocol %s", protocol ); /* * Since we cannot process this message further we need to release the message as per netty doc * see http://netty.io/wiki/reference-counted-objects.html#inbound-messages */ ReferenceCountUtil.release( msg ); return; } delegate.channelRead( ctx, msg ); }
private void invokeChannelRead(Object msg) { if (invokeHandler()) { try { ((ChannelInboundHandler) handler()).channelRead(this, msg); } catch (Throwable t) { notifyHandlerException(t); } } else { fireChannelRead(msg); } }
private void invokeChannelRead(Object msg) { if (invokeHandler()) { try { ((ChannelInboundHandler) handler()).channelRead(this, msg); } catch (Throwable t) { notifyHandlerException(t); } } else { fireChannelRead(msg); } }
private void invokeChannelRead(Object msg) { if (invokeHandler()) { try { ((ChannelInboundHandler) handler()).channelRead(this, msg); } catch (Throwable t) { notifyHandlerException(t); } } else { fireChannelRead(msg); } }