@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.info(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof IdleStateEvent) { channelIdle(ctx, (IdleStateEvent) e); } else { super.handleUpstream(ctx, e); } }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.debug(e.toString()); ChannelStateEvent cse = (ChannelStateEvent)e; if ((cse.getState() == ChannelState.OPEN) && (Boolean.FALSE.equals(cse.getValue()))) { // Server closed connection; disconnect client side LOG.debug("Remote peer " + remoteAddr + " closed connection."); disconnect(false, true, null); } } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { // logger.info("Handler up " + e.getChannel().getInterestOps()); super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { System.err.println(e); } // Let SimpleChannelHandler call actual event handler methods below. super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.info(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.debug(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.info(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.info(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if(e instanceof ChannelStateEvent && ((ChannelStateEvent) e).getState() != ChannelState.INTEREST_OPS) { LOG.debug(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { if (((ChannelStateEvent) e).getState() != ChannelState.INTEREST_OPS) { System.err.println(e); } this.channelStateEvent = (ChannelStateEvent)e; } // Let SimpleChannelHandler call actual event handler methods below. super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if(e instanceof ChannelStateEvent && ((ChannelStateEvent) e).getState() != ChannelState.INTEREST_OPS) { LOG.debug(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.debug(e.toString()); ChannelStateEvent cse = (ChannelStateEvent)e; if ((cse.getState() == ChannelState.OPEN) && (Boolean.FALSE.equals(cse.getValue()))) { // Server closed connection; disconnect client side LOG.debug("Remote peer " + remoteAddr + " closed connection."); disconnect(false, true, null); } } super.handleUpstream(ctx, e); }
/** * <p> * {@inheritDoc} * </p> * <p> * Overriden to log ChannelStateEvents if they have a state other than * {@link ChannelState#INTEREST_OPS}, i. e. OPEN, BOUND, CONNECTED. * </p> * * @param ctx * the context object for this handler * @param e * the upstream event to process or intercept */ @Override public void handleUpstream(final ChannelHandlerContext ctx, final ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent && ((ChannelStateEvent) e).getState() != ChannelState.INTEREST_OPS) { log.info(e.toString()); } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { LOG.debug(e.toString()); ChannelStateEvent cse = (ChannelStateEvent) e; if ((cse.getState() == ChannelState.OPEN) && (Boolean.FALSE.equals(cse.getValue()))) { // Server closed connection; disconnect client side LOG.debug("Remote peer " + remoteAddr + " closed connection."); disconnect(false, true, null); } } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof HandshakeEvent) { if (((HandshakeEvent) e).isSuccessful()) { out("--- CLIENT-HANDLER :: Handshake successful, connection " + "to " + ((HandshakeEvent) e).getRemoteId() + " is up."); } else { out("--- CLIENT-HANDLER :: Handshake failed."); } return; } super.handleUpstream(ctx, e); }
@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof HandshakeEvent) { if (((HandshakeEvent) e).isSuccessful()) { out("+++ SERVER-HANDLER :: Handshake successful, connection " + "to " + ((HandshakeEvent) e).getRemoteId() + " is up."); this.remoteId = ((HandshakeEvent) e).getRemoteId(); this.channel = ctx.getChannel(); // Notify the listener that a new connection is now READY this.listener.connectionOpen(this); } else { out("+++ SERVER-HANDLER :: Handshake failed."); } return; } super.handleUpstream(ctx, e); }