@Test(timeout = 60000) public void testInputCompleteOnChannelUnregister() throws Exception { connectionHandlerRule.channel.config().setAutoRead(false); ConnectionSubscriber subscriber = connectionHandlerRule.enableConnectionSubscriberAndAssert(true); connectionHandlerRule.activateConnectionAndAssert(subscriber); ConnectionInputSubscriber inputSubscriber = subscriber.getInputSubscriber(); connectionHandlerRule.startRead(); connectionHandlerRule.testSendInputMsgs(inputSubscriber, "hello1"); assertThat("Unexpected notifications count after channel active.", inputSubscriber.getOnNextEvents(), hasSize(1)); inputSubscriber.unsubscribe(); connectionHandlerRule.handler.channelUnregistered(connectionHandlerRule.ctx); inputSubscriber.assertNoErrors(); assertThat("Unexpected notifications count after channel active.", inputSubscriber.getOnNextEvents(), hasSize(1)); }
@Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { if (isValidToEmitToReadSubscriber(readProducer)) { readProducer.sendOnError(CLOSED_CHANNEL_EXCEPTION); } super.channelUnregistered(ctx); }
AbstractConnectionToChannelBridge extends BackpressureManagingHandler { @Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { if (isValidToEmitToReadSubscriber(readProducer)) { readProducer.sendOnError(CLOSED_CHANNEL_EXCEPTION); } super.channelUnregistered(ctx); } }
AbstractConnectionToChannelBridge extends BackpressureManagingHandler { @Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { if (isValidToEmitToReadSubscriber(readProducer)) { readProducer.sendOnError(CLOSED_CHANNEL_EXCEPTION); } super.channelUnregistered(ctx); } protected  AbstractConnectionToChannelBridge(String thisHandlerName, ConnectionEventListener eventListener,
                                                EventPublisher eventPublisher); protected  AbstractConnectionToChannelBridge(String thisHandlerName,
                                                AttributeKey<ConnectionEventListener> eventListenerAttributeKey,
                                                AttributeKey<EventPublisher> eventPublisherAttributeKey); }
AbstractConnectionToChannelBridge extends BackpressureManagingHandler { @Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { if (isValidToEmitToReadSubscriber(readProducer)) { readProducer.sendOnError(CLOSED_CHANNEL_EXCEPTION); } super.channelUnregistered(ctx); } protected  AbstractConnectionToChannelBridge(String thisHandlerName, ConnectionEventListener eventListener,
                                                EventPublisher eventPublisher); protected  AbstractConnectionToChannelBridge(String thisHandlerName,
                                                AttributeKey<ConnectionEventListener> eventListenerAttributeKey,
                                                AttributeKey<EventPublisher> eventPublisherAttributeKey); @Override void handlerAdded(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void channelUnregistered(ChannelHandlerContext ctx); @Override void userEventTriggered(ChannelHandlerContext ctx, Object evt); @SuppressWarnings("unchecked") @Override void newMessage(ChannelHandlerContext ctx, Object msg); @Override boolean shouldReadMore(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause); }
AbstractConnectionToChannelBridge extends BackpressureManagingHandler { @Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { if (isValidToEmitToReadSubscriber(readProducer)) { readProducer.sendOnError(CLOSED_CHANNEL_EXCEPTION); } super.channelUnregistered(ctx); } protected  AbstractConnectionToChannelBridge(String thisHandlerName, ConnectionEventListener eventListener,
                                                EventPublisher eventPublisher); protected  AbstractConnectionToChannelBridge(String thisHandlerName,
                                                AttributeKey<ConnectionEventListener> eventListenerAttributeKey,
                                                AttributeKey<EventPublisher> eventPublisherAttributeKey); @Override void handlerAdded(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void channelUnregistered(ChannelHandlerContext ctx); @Override void userEventTriggered(ChannelHandlerContext ctx, Object evt); @SuppressWarnings("unchecked") @Override void newMessage(ChannelHandlerContext ctx, Object msg); @Override boolean shouldReadMore(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause);  }