Class Http.IncomingConnection

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product
    Enclosing class:
    Http

    public static final class Http.IncomingConnection
    extends java.lang.Object
    implements scala.Product, java.io.Serializable
    Represents one accepted incoming HTTP connection.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      akka.stream.scaladsl.Flow<HttpResponse,​HttpRequest,​ServerTerminator> _flow()  
      akka.stream.scaladsl.Flow<HttpResponse,​HttpRequest,​akka.NotUsed> flow()  
      <Mat> Mat handleWith​(akka.stream.scaladsl.Flow<HttpRequest,​HttpResponse,​Mat> handler, akka.stream.Materializer fm)
      Handles the connection with the given flow, which is materialized exactly once and the respective materialization result returned.
      void handleWithAsyncHandler​(scala.Function1<HttpRequest,​scala.concurrent.Future<HttpResponse>> handler, int parallelism, akka.stream.Materializer fm)
      Handles the connection with the given handler function.
      void handleWithSyncHandler​(scala.Function1<HttpRequest,​HttpResponse> handler, akka.stream.Materializer fm)
      Handles the connection with the given handler function.
      java.net.InetSocketAddress localAddress()  
      java.net.InetSocketAddress remoteAddress()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface scala.Equals

        canEqual, equals
      • Methods inherited from interface scala.Product

        productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
    • Constructor Detail

      • IncomingConnection

        public IncomingConnection​(java.net.InetSocketAddress localAddress,
                                  java.net.InetSocketAddress remoteAddress,
                                  akka.stream.scaladsl.Flow<HttpResponse,​HttpRequest,​ServerTerminator> _flow)
    • Method Detail

      • localAddress

        public java.net.InetSocketAddress localAddress()
      • remoteAddress

        public java.net.InetSocketAddress remoteAddress()
      • handleWith

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

        public void handleWithSyncHandler​(scala.Function1<HttpRequest,​HttpResponse> handler,
                                          akka.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,
                                           akka.stream.Materializer fm)
        Handles the connection with the given handler function.
        Parameters:
        handler - (undocumented)
        parallelism - (undocumented)
        fm - (undocumented)