static String fetchStatusWithValidation(final ControlNotificationHandler handler) {
    ServiceState<?> state = handler.handleStatus();
    if (state == null) {
      throw new IllegalStateException("Null ServiceState is invalid");
    }

    String jsonContent = state.toJson();
    if (jsonContent == null) {
      throw new IllegalStateException("Null JSON for status is invalid");
    } else if (jsonContent.trim().isEmpty()) {
      throw new IllegalStateException("Empty JSON for status is invalid");
    }

    return jsonContent;
  }
Returns the PID file.

@return the PID file
geode-core/src/main/java/org/apache/geode/internal/process/FileControllableProcess.java