code: public static Validator validHostAndPort(Integer defaultPort, boolean requireBracketsForIPv6, boolean portRequired) {
      return ValidHostAndPort.of(defaultPort, requireBracketsForIPv6, portRequired);
    }
docs: Validator to ensure that a configuration setting is a hostname and port.
  
  @param defaultPort
  @param requireBracketsForIPv6
  @param portRequired
  @return validator