180181182183184185186187188189190
executor.scheduleAtFixedRate(new Runnable() { public void run() { try { if (con.isOpen()) { connection.ping(); } else { throw new RuntimeException("connection already closed"); } }