/** * This will parse out the command. Lookup the appropriate Handler and pass the information to the * handler for processing. * * <p>Dev Note: the command parsing is processed here so that it is preformed by the assigned * thread rather than the listeners thread. */ public void run() { try { logger.trace("start listening for cluster messages"); SocketConnection sc = new SocketConnection(clientSocket); while (true) { if (owner.process(sc)) { // got the offline message or timeout break; } } logger.trace("disconnecting: {}", hostPort); sc.disconnect(); } catch (Exception e) { logger.error("Error listening for messages - " + owner.getHostPort(), e); } }