Package akka.http.javadsl
Class IncomingConnection
java.lang.Object
akka.http.javadsl.IncomingConnection
Represents one accepted incoming HTTP connection.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionakka.stream.javadsl.Flow<HttpResponse,
HttpRequest, akka.NotUsed> flow()
A flow representing the incoming requests and outgoing responses for this connection.<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.void
handleWithAsyncHandler
(akka.japi.function.Function<HttpRequest, CompletionStage<HttpResponse>> handler, int parallelism, akka.stream.Materializer materializer) Handles the connection with the given handler function.void
handleWithAsyncHandler
(akka.japi.function.Function<HttpRequest, CompletionStage<HttpResponse>> handler, akka.stream.Materializer materializer) Handles the connection with the given handler function.void
handleWithSyncHandler
(akka.japi.function.Function<HttpRequest, HttpResponse> handler, akka.stream.Materializer materializer) Handles the connection with the given handler function.The local address of this connection.The address of the remote peer.
-
Constructor Details
-
IncomingConnection
-
-
Method Details
-
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
The local address of this connection.- Returns:
- (undocumented)
-
remoteAddress
The address of the remote peer.- Returns:
- (undocumented)
-