Class IncomingConnection

java.lang.Object
akka.http.javadsl.IncomingConnection

public class IncomingConnection extends Object
Represents one accepted incoming HTTP connection.
  • Constructor Details

  • Method Details

    • flow

      public akka.stream.javadsl.Flow<HttpResponse,HttpRequest,akka.NotUsed> flow()
      A flow representing the incoming requests and outgoing responses for this connection.

      Use Flow.join or one of the handleXXX methods to consume handle requests on this connection.

      Returns:
      (undocumented)
    • handleWith

      public <Mat> Mat handleWith(akka.stream.javadsl.Flow<HttpRequest,HttpResponse,Mat> handler, akka.stream.Materializer materializer)
      Handles the connection with the given flow, which is materialized exactly once and the respective materialization result returned.
      Parameters:
      handler - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • handleWithAsyncHandler

      public void handleWithAsyncHandler(akka.japi.function.Function<HttpRequest,CompletionStage<HttpResponse>> handler, akka.stream.Materializer materializer)
      Handles the connection with the given handler function.
      Parameters:
      handler - (undocumented)
      materializer - (undocumented)
    • handleWithAsyncHandler

      public void handleWithAsyncHandler(akka.japi.function.Function<HttpRequest,CompletionStage<HttpResponse>> handler, int parallelism, akka.stream.Materializer materializer)
      Handles the connection with the given handler function.
      Parameters:
      handler - (undocumented)
      parallelism - (undocumented)
      materializer - (undocumented)
    • handleWithSyncHandler

      public void handleWithSyncHandler(akka.japi.function.Function<HttpRequest,HttpResponse> handler, akka.stream.Materializer materializer)
      Handles the connection with the given handler function.
      Parameters:
      handler - (undocumented)
      materializer - (undocumented)
    • localAddress

      public InetSocketAddress localAddress()
      The local address of this connection.
      Returns:
      (undocumented)
    • remoteAddress

      public InetSocketAddress remoteAddress()
      The address of the remote peer.
      Returns:
      (undocumented)