Class ConnectionContext

java.lang.Object
org.apache.pekko.http.javadsl.ConnectionContext
Direct Known Subclasses:
HttpConnectionContext, HttpsConnectionContext

public abstract class ConnectionContext extends Object
  • Constructor Details

    • ConnectionContext

      public ConnectionContext()
  • Method Details

    • httpsServer

      public static HttpsConnectionContext httpsServer(SSLContext sslContext)
      Creates an HttpsConnectionContext for server-side use from the given SSLContext.
      Parameters:
      sslContext - (undocumented)
      Returns:
      (undocumented)
    • httpsServer

      public static HttpsConnectionContext httpsServer(org.apache.pekko.japi.function.Creator<SSLEngine> createEngine)
      If you want complete control over how to create the SSLEngine you can use this method.
      Parameters:
      createEngine - (undocumented)
      Returns:
      (undocumented)
    • httpsClient

      public static HttpsConnectionContext httpsClient(SSLContext sslContext)
      Creates an HttpsConnectionContext for client-side use from the given SSLContext.
      Parameters:
      sslContext - (undocumented)
      Returns:
      (undocumented)
    • httpsClient

      public static HttpsConnectionContext httpsClient(org.apache.pekko.japi.function.Function2<String,Integer,SSLEngine> createEngine)
      If you want complete control over how to create the SSLEngine you can use this method.

      Note that this means it is up to you to make sure features like SNI and hostname verification are enabled as needed.

      Parameters:
      createEngine - (undocumented)
      Returns:
      (undocumented)
    • noEncryption

      public static HttpConnectionContext noEncryption()
      Used to serve HTTP traffic.
    • isSecure

      public abstract boolean isSecure()