private static Set<SessionProtocol> checkProtocols(Iterable<SessionProtocol> protocols) {
        final Set<SessionProtocol> copy = Sets.immutableEnumSet(requireNonNull(protocols, "protocols"));
        checkArgument(!copy.isEmpty(),
                      "protocols: %s (must not be empty)", copy);
        checkArgument(copy.contains(HTTP) || copy.contains(HTTPS),
                      "protocols: %s (must contain HTTP or HTTPS)", copy);
        checkArgument(copy.stream().allMatch(p -> p == HTTP || p == HTTPS || p == PROXY),
                      "protocols: %s (must not contain other than %s, %s or %s)",
                      copy, HTTP, HTTPS, PROXY);
        return copy;
    }
Creates a new {@link ServerPort} that listens to the specified {@code localAddress} using the specified
{@link SessionProtocol}s.

@param portGroup a unique value that is used for identifying a group of {@link ServerPort}s.
                 When two ephemeral {@link ServerPort}s have the same port group value, {@link Server}
                 will choose the same port number for them, rather than allocating two ephemeral ports.
core/src/main/java/com/linecorp/armeria/server/ServerPort.java