Class RouteResult$
java.lang.Object
org.apache.pekko.http.scaladsl.server.RouteResult$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RouteResult$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse, org.apache.pekko.NotUsed> routeToFlow(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> route, org.apache.pekko.actor.ClassicActorSystemProvider system) Turns aRouteinto a server flow.scala.Function1<HttpRequest,scala.concurrent.Future<HttpResponse>> routeToFunction(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> route, org.apache.pekko.actor.ClassicActorSystemProvider system) Turns aRouteinto a server function.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
RouteResult$
public RouteResult$()
-
-
Method Details
-
routeToFlow
public org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse, routeToFloworg.apache.pekko.NotUsed> (scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> route, org.apache.pekko.actor.ClassicActorSystemProvider system) Turns aRouteinto a server flow.This implicit conversion is defined here because
Routeis an alias forRequestContext => Future[RouteResult], and the fact thatRouteResultis in that type means this implicit conversion come into scope whereever aRouteis given but aFlowis expected.- Parameters:
route- (undocumented)system- (undocumented)- Returns:
- (undocumented)
-
routeToFunction
public scala.Function1<HttpRequest,scala.concurrent.Future<HttpResponse>> routeToFunction(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> route, org.apache.pekko.actor.ClassicActorSystemProvider system) Turns aRouteinto a server function.This implicit conversion is defined here because
Routeis an alias forRequestContext => Future[RouteResult], and the fact thatRouteResultis in that type means this implicit conversion come into scope whereever aRouteis given but aFunction[HttpRequest, Future[HttpResponse]is expected.- Parameters:
route- (undocumented)system- (undocumented)- Returns:
- (undocumented)
-