@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof IdleStateEvent) { LOG.debug("Get idle state event"); IdleStateEvent event = (IdleStateEvent) evt; if (event.state() == IdleState.READER_IDLE) { LOG.debug("Reader idle state. Send echo message to peer"); //Send echo message to peer OvsdbClient client = OvsdbConnectionService.getService().getClient(ctx.channel()); client.echo(); } } } }