@Override public ChannelPipeline fireChannelRegistered() { delegate.fireChannelRegistered(); return this; }
@Override @SuppressWarnings("unchecked") public final void channelRegistered(ChannelHandlerContext ctx) throws Exception { // Normally this method will never be called as handlerAdded(...) should call initChannel(...) and remove // the handler. if (initChannel(ctx)) { // we called initChannel(...) so we need to call now pipeline.fireChannelRegistered() to ensure we not // miss an event. ctx.pipeline().fireChannelRegistered(); // We are done with init the Channel, removing all the state for the Channel now. removeState(ctx); } else { // Called initChannel(...) before which is the expected behavior, so just forward the event. ctx.fireChannelRegistered(); } }
@Override @SuppressWarnings("unchecked") public final void channelRegistered(ChannelHandlerContext ctx) throws Exception { // Normally this method will never be called as handlerAdded(...) should call initChannel(...) and remove // the handler. if (initChannel(ctx)) { // we called initChannel(...) so we need to call now pipeline.fireChannelRegistered() to ensure we not // miss an event. ctx.pipeline().fireChannelRegistered(); } else { // Called initChannel(...) before which is the expected behavior, so just forward the event. ctx.fireChannelRegistered(); } }
@Override @SuppressWarnings("unchecked") public final void channelRegistered(ChannelHandlerContext ctx) throws Exception { // Normally this method will never be called as handlerAdded(...) should call initChannel(...) and remove // the handler. if (initChannel(ctx)) { // we called initChannel(...) so we need to call now pipeline.fireChannelRegistered() to ensure we not // miss an event. ctx.pipeline().fireChannelRegistered(); // We are done with init the Channel, removing all the state for the Channel now. removeState(ctx); } else { // Called initChannel(...) before which is the expected behavior, so just forward the event. ctx.fireChannelRegistered(); } }
break; case Registered: pipeline.fireChannelRegistered(); break; case Active: pipeline.fireChannelRegistered(); pipeline.fireChannelActive(); break; case Inactive: pipeline.fireChannelRegistered(); pipeline.fireChannelActive(); pipeline.fireChannelInactive();
@Override public void register(EventLoop eventLoop, ChannelPromise promise) { if (!promise.setUncancellable()) { return; } if (registered) { throw new UnsupportedOperationException("Re-register is not supported"); } registered = true; if (!outbound) { // Add the handler to the pipeline now that we are registered. pipeline().addLast(inboundStreamHandler); } promise.setSuccess(); pipeline().fireChannelRegistered(); if (isActive()) { pipeline().fireChannelActive(); } }
@Override public ChannelPipeline fireChannelRegistered() { pipeline.fireChannelRegistered(); return this; }
@Override public void channelRegistered(ChannelHandlerContext ctx) { initChannel(ctx.channel()); ctx.pipeline().remove(this); ctx.pipeline().fireChannelRegistered(); }
@Override @SuppressWarnings("unchecked") public final void channelRegistered(ChannelHandlerContext ctx) throws Exception { // Normally this method will never be called as handlerAdded(...) should call initChannel(...) and remove // the handler. if (initChannel(ctx)) { // we called initChannel(...) so we need to call now pipeline.fireChannelRegistered() to ensure we not // miss an event. ctx.pipeline().fireChannelRegistered(); } else { // Called initChannel(...) before which is the expected behavior, so just forward the event. ctx.fireChannelRegistered(); } }
@Override public void channelRegistered(ChannelHandlerContext channelHandlerContext) throws Exception { try { initChannel(channelHandlerContext.channel()); } catch (Throwable t) { exceptionCaught(channelHandlerContext, t); } finally { ChannelPipeline pipeline = channelHandlerContext.pipeline(); if (pipeline.context(this) != null) { pipeline.remove(this); } } channelHandlerContext.pipeline().fireChannelRegistered(); }
@Override @SuppressWarnings("unchecked") public final void channelRegistered(ChannelHandlerContext ctx) throws Exception { // Normally this method will never be called as handlerAdded(...) should call initChannel(...) and remove // the handler. if (initChannel(ctx)) { // we called initChannel(...) so we need to call now pipeline.fireChannelRegistered() to ensure we not // miss an event. ctx.pipeline().fireChannelRegistered(); } else { // Called initChannel(...) before which is the expected behavior, so just forward the event. ctx.fireChannelRegistered(); } }
@Override public void channelRegistered(ChannelHandlerContext channelHandlerContext) throws Exception { try { initChannel(channelHandlerContext.channel()); } catch (Throwable t) { exceptionCaught(channelHandlerContext, t); } finally { ChannelPipeline pipeline = channelHandlerContext.pipeline(); if (pipeline.context(this) != null) { pipeline.remove(this); } } channelHandlerContext.pipeline().fireChannelRegistered(); }
@Override @SuppressWarnings("unchecked") public final void channelRegistered(ChannelHandlerContext ctx) throws Exception { // Normally this method will never be called as handlerAdded(...) should call initChannel(...) and remove // the handler. if (initChannel(ctx)) { // we called initChannel(...) so we need to call now pipeline.fireChannelRegistered() to ensure we not // miss an event. ctx.pipeline().fireChannelRegistered(); } else { // Called initChannel(...) before which is the expected behavior, so just forward the event. ctx.fireChannelRegistered(); } }
@Override public void register(EventLoop eventLoop, ChannelPromise promise) { if (!promise.setUncancellable()) { return; } if (registered) { throw new UnsupportedOperationException("Re-register is not supported"); } registered = true; if (!outbound) { // Add the handler to the pipeline now that we are registered. pipeline().addLast(inboundStreamHandler); } promise.setSuccess(); pipeline().fireChannelRegistered(); if (isActive()) { pipeline().fireChannelActive(); } }
@Override public void register(EventLoop eventLoop, ChannelPromise promise) { if (!promise.setUncancellable()) { return; } if (registered) { throw new UnsupportedOperationException("Re-register is not supported"); } registered = true; if (!outbound) { // Add the handler to the pipeline now that we are registered. pipeline().addLast(inboundStreamHandler); } promise.setSuccess(); pipeline().fireChannelRegistered(); if (isActive()) { pipeline().fireChannelActive(); } }
@Override public void register(EventLoop eventLoop, ChannelPromise promise) { if (!promise.setUncancellable()) { return; } if (registered) { throw new UnsupportedOperationException("Re-register is not supported"); } registered = true; if (!outbound) { // Add the handler to the pipeline now that we are registered. pipeline().addLast(inboundStreamHandler); } promise.setSuccess(); pipeline().fireChannelRegistered(); if (isActive()) { pipeline().fireChannelActive(); } }
@Override public void register(EventLoop eventLoop, ChannelPromise promise) { if (!promise.setUncancellable()) { return; } if (registered) { throw new UnsupportedOperationException("Re-register is not supported"); } registered = true; if (!outbound) { // Add the handler to the pipeline now that we are registered. pipeline().addLast(inboundStreamHandler); } promise.setSuccess(); pipeline().fireChannelRegistered(); if (isActive()) { pipeline().fireChannelActive(); } }