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 aRoute
into 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 aRoute
into 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 aRoute
into a server flow.This implicit conversion is defined here because
Route
is an alias forRequestContext => Future[RouteResult]
, and the fact thatRouteResult
is in that type means this implicit conversion come into scope whereever aRoute
is given but aFlow
is 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 aRoute
into a server function.This implicit conversion is defined here because
Route
is an alias forRequestContext => Future[RouteResult]
, and the fact thatRouteResult
is in that type means this implicit conversion come into scope whereever aRoute
is given but aFunction[HttpRequest, Future[HttpResponse]
is expected.- Parameters:
route
- (undocumented)system
- (undocumented)- Returns:
- (undocumented)
-