Class Http2Ext

java.lang.Object
org.apache.pekko.http.impl.engine.http2.Http2Ext
All Implemented Interfaces:
org.apache.pekko.actor.Extension

public final class Http2Ext extends Object implements org.apache.pekko.actor.Extension
INTERNAL API

Internal entry points for Http/2 server

Opentelemetry Java Instrumentation relies on this class so avoid changing it. Besides Http2Ext.bindAndHandleAsync the agent also reads the system member to obtain a dispatcher for the response future, so keep that accessor around too. See https://github.com/apache/pekko-http/issues/1241

  • Constructor Details

    • Http2Ext

      public Http2Ext(org.apache.pekko.actor.ActorSystem system)
  • Method Details

    • ConnectionUpgradeHeader

      public Connection ConnectionUpgradeHeader()
    • UpgradeHeader

      public Upgrade UpgradeHeader()
    • bindAndHandleAsync

      public scala.concurrent.Future<Http.ServerBinding> bindAndHandleAsync(scala.Function1<HttpRequest,scala.concurrent.Future<HttpResponse>> handler, String interface_, int port, ConnectionContext connectionContext, ServerSettings settings, org.apache.pekko.event.LoggingAdapter log, org.apache.pekko.stream.Materializer fm)

      Opentelemetry Java Instrumentation relies on this method so avoid changing it. HTTP/2 bindings do not go through HttpExt, so this is the only server entry point the agent can hook for HTTP/2. See https://github.com/apache/pekko-http/issues/1241

      Parameters:
      handler - (undocumented)
      interface_ - (undocumented)
      port - (undocumented)
      connectionContext - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      fm - (undocumented)
      Returns:
      (undocumented)
    • http

      public HttpExt http()
    • httpsWithAlpn

      public org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,org.apache.pekko.util.ByteString,scala.concurrent.Future<ServerTerminator>> httpsWithAlpn(HttpsConnectionContext httpsContext, org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.stream.TLSProtocol.SslTlsInbound,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,ServerTerminator> http1, org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.stream.TLSProtocol.SslTlsInbound,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,ServerTerminator> http2)
    • outgoingConnection

      public org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> outgoingConnection(String host, int port, HttpsConnectionContext connectionContext, ClientConnectionSettings clientConnectionSettings, org.apache.pekko.event.LoggingAdapter log)
    • outgoingConnectionPriorKnowledge

      public org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> outgoingConnectionPriorKnowledge(String host, int port, ClientConnectionSettings clientConnectionSettings, org.apache.pekko.event.LoggingAdapter log)
    • system

      public org.apache.pekko.actor.ActorSystem system()
    • telemetry

      public TelemetrySpi telemetry()