// Path: src/main/java/info/jdavid/ok/server/header/Connection.java
// @SuppressWarnings({ "WeakerAccess", "unused" })
// public final class Connection {
// 
//   private Connection() {}
// 
//   public static final String HEADER = "Connection";
// 
//   public static final String CLOSE = "Close";
//   public static final String KEEP_ALIVE = "Keep-Alive";
// 
// }


import javax.annotation.Nullable;
import info.jdavid.ok.server.header.Connection;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okio.Buffer;
   * @param url the challenge request url.
   * @param requestHeaders the challenge request headers.
   * @param requestBody the challenge request body.
   * @return the challenge response.
   */
  protected abstract Response handleAcmeChallenge(final String clientIp,
                                                  final String method,
                                                  final HttpUrl url,
                                                  final Headers requestHeaders,
                                                  @Nullable final Buffer requestBody);

  /**
   * Handles a request once the request validation has been performed.
   * @param clientIp the request client ip.
   * @param http2 true if the request is using http 2 (h2).
   * @param method the request method.
   * @param url the request url.
   * @param requestHeaders the request headers.
   * @param requestBody the request body.
   * @return the response.
   */
  protected abstract Response handle(final String clientIp, final boolean http2,
                                     final String method, final HttpUrl url,
                                     final Headers requestHeaders,
                                     @Nullable final Buffer requestBody);


  private static final Response FORBIDDEN =
    new Response.Builder().
      statusLine(StatusLines.FORBIDDEN).
// Path: src/main/java/info/jdavid/ok/server/header/Connection.java
// @SuppressWarnings({ "WeakerAccess", "unused" })
// public final class Connection {
// 
//   private Connection() {}
// 
//   public static final String HEADER = "Connection";
// 
//   public static final String CLOSE = "Close";
//   public static final String KEEP_ALIVE = "Keep-Alive";
// 
// }


// Path: src/main/java/info/jdavid/ok/server/AbstractRequestHandler.java
import javax.annotation.Nullable;
import info.jdavid.ok.server.header.Connection;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okio.Buffer;

   * @param url the challenge request url.
   * @param requestHeaders the challenge request headers.
   * @param requestBody the challenge request body.
   * @return the challenge response.
   */
  protected abstract Response handleAcmeChallenge(final String clientIp,
                                                  final String method,
                                                  final HttpUrl url,
                                                  final Headers requestHeaders,
                                                  @Nullable final Buffer requestBody);

  /**
   * Handles a request once the request validation has been performed.
   * @param clientIp the request client ip.
   * @param http2 true if the request is using http 2 (h2).
   * @param method the request method.
   * @param url the request url.
   * @param requestHeaders the request headers.
   * @param requestBody the request body.
   * @return the response.
   */
  protected abstract Response handle(final String clientIp, final boolean http2,
                                     final String method, final HttpUrl url,
                                     final Headers requestHeaders,
                                     @Nullable final Buffer requestBody);


  private static final Response FORBIDDEN =
    new Response.Builder().
      statusLine(StatusLines.FORBIDDEN).
      header(Connection.HEADER, Connection.CLOSE).