Class Http.IncomingConnection

java.lang.Object
org.apache.pekko.http.scaladsl.Http.IncomingConnection
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product
Enclosing class:
Http

public static final class Http.IncomingConnection extends Object implements scala.Product, Serializable
Represents one accepted incoming HTTP connection.
See Also:
  • Constructor Details

  • Method Details

    • localAddress

      public InetSocketAddress localAddress()
    • remoteAddress

      public InetSocketAddress remoteAddress()
    • _flow

      public org.apache.pekko.stream.scaladsl.Flow<HttpResponse,HttpRequest,ServerTerminator> _flow()
    • flow

      public org.apache.pekko.stream.scaladsl.Flow<HttpResponse,HttpRequest,org.apache.pekko.NotUsed> flow()
    • handleWith

      public <Mat> Mat handleWith(org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,Mat> handler, org.apache.pekko.stream.Materializer fm)
      Handles the connection with the given flow, which is materialized exactly once and the respective materialization result returned.

      Opentelemetry Java Instrumentation relies on this method so avoid changing it. It is the server entry point the agent instruments for bindings created from a connection source. See https://github.com/apache/pekko-http/issues/1241

      Parameters:
      handler - (undocumented)
      fm - (undocumented)
      Returns:
      (undocumented)
    • handleWithSyncHandler

      public void handleWithSyncHandler(scala.Function1<HttpRequest,HttpResponse> handler, org.apache.pekko.stream.Materializer fm)
      Handles the connection with the given handler function.
      Parameters:
      handler - (undocumented)
      fm - (undocumented)
    • handleWithAsyncHandler

      public void handleWithAsyncHandler(scala.Function1<HttpRequest,scala.concurrent.Future<HttpResponse>> handler, int parallelism, org.apache.pekko.stream.Materializer fm)
      Handles the connection with the given handler function.
      Parameters:
      handler - (undocumented)
      parallelism - (undocumented)
      fm - (undocumented)