private static int getPortFromProperty() {
    String property = System.getProperty(DISPATCH_PORT_SYS_PROP);
    try {
      if (property == null || property.trim().isEmpty()) {
        throw new IllegalStateException("System property '" + DISPATCH_PORT_SYS_PROP + "' is not set");
      }
      return Integer.parseInt(property);
    } catch (NumberFormatException e) {
      throw new IllegalStateException("System property '" + DISPATCH_PORT_SYS_PROP + "' has invalid value: " + property, e);
    }
  }
private static int getPortFromProperty()