if (origNode != null) { if (!agentId.toString().equals(origNode)) {  logger.debug("doAction, forwarding request: " + hmr); sendRemoteRequest(new RemoteRequest(hmr.getAgents(), hmr.getRequestType(), origNode, destNode, hmr.getCommunityName()));
if (origNode != null && !agentId.toString().equals(origNode)) {  logger.debug("doAction, forwarding request: " + hmr); sendRemoteRequest(new RemoteRequest(hmr.getAgents(), hmr.getRequestType(), origNode, destNode, hmr.getCommunityName()));
  protected void doAction(HealthMonitorRequest hmr) {    String origNode = hmr.getOriginNode();    String destNode = hmr.getDestinationNode();    switch (hmr.getRequestType()) {      case HealthMonitorRequest.RESTART:        if (origNode != null && destNode != null) {          if (!agentId.toString().equals(destNode)) {            // Forward request to destination node            logger.debug("doAction, forwarding request: " + hmr);            sendRemoteRequest(new RemoteRequest(hmr.getAgents(),                                                hmr.getRequestType(),                                                destNode,                                                origNode,                                                hmr.getCommunityName()));          } else { // local request            String agentNames[] = hmr.getAgents();            for (int i = 0; i < agentNames.length; i++) {              doLocalAction(agentNames[i], hmr.getRequestType());            }          }        }        break;      case HealthMonitorRequest.KILL:        if (origNode != null) {          if (!agentId.toString().equals(origNode)) {            // Forward request to destination node            logger.debug("doAction, forwarding request: " + hmr);            sendRemoteRequest(new RemoteRequest(hmr.getAgents(),                                                hmr.getRequestType(),                                                origNode,                                                destNode,                                                hmr.getCommunityName()));          } else { // local request            String agentNames[] = hmr.getAgents();            for (int i = 0; i < agentNames.length; i++) {              doLocalAction(agentNames[i], hmr.getRequestType());            }          }        }        break;    }  }