Package akka.http.scaladsl
Class Http.IncomingConnection
- java.lang.Object
-
- akka.http.scaladsl.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
-
-
Constructor Summary
Constructors Constructor Description IncomingConnection(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress remoteAddress, akka.stream.scaladsl.Flow<HttpResponse,HttpRequest,ServerTerminator> _flow)
-
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()
-
-
-
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()
-
_flow
public akka.stream.scaladsl.Flow<HttpResponse,HttpRequest,ServerTerminator> _flow()
-
flow
public akka.stream.scaladsl.Flow<HttpResponse,HttpRequest,akka.NotUsed> flow()
-
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)
-
-