// Path: src/main/java/info/jdavid/ok/server/Logger.java
// static final org.slf4j.Logger logger = LoggerFactory.getLogger(HttpServer.class);


import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import static info.jdavid.ok.server.Logger.logger;
        "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
        "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
        "TLS_RSA_WITH_AES_128_GCM_SHA256",
        "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
        "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
        "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
        "TLS_RSA_WITH_AES_128_CBC_SHA"
      );
    }

    @Override void setupSSLSocket(final SSLSocket socket, final boolean http2) throws IOException {
      if (http2) Platform.setHttp2Protocol(socket, applicationProtocols);
    }

    @Override boolean supportsHttp2() {
      return applicationProtocols != null;
    }

  }

  static class Jdk7Platform extends Platform {

    static Platform buildIfSupported() {
      return JAVA_SPEC_VERSION.startsWith("1.7") ? new Jdk8Platform() : null;
    }

    private final Field applicationProtocols;

    private Jdk7Platform() {
      super();
// Path: src/main/java/info/jdavid/ok/server/Logger.java
// static final org.slf4j.Logger logger = LoggerFactory.getLogger(HttpServer.class);


// Path: src/main/java/info/jdavid/ok/server/Platform.java
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import static info.jdavid.ok.server.Logger.logger;

        "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
        "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
        "TLS_RSA_WITH_AES_128_GCM_SHA256",
        "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
        "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
        "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
        "TLS_RSA_WITH_AES_128_CBC_SHA"
      );
    }

    @Override void setupSSLSocket(final SSLSocket socket, final boolean http2) throws IOException {
      if (http2) Platform.setHttp2Protocol(socket, applicationProtocols);
    }

    @Override boolean supportsHttp2() {
      return applicationProtocols != null;
    }

  }

  static class Jdk7Platform extends Platform {

    static Platform buildIfSupported() {
      return JAVA_SPEC_VERSION.startsWith("1.7") ? new Jdk8Platform() : null;
    }

    private final Field applicationProtocols;

    private Jdk7Platform() {
      super();
      logger.info("JDK7 Platform");