Class RouteAdapter
- All Implemented Interfaces:
HandlerProvider
,Route
-
Constructor Summary
ConstructorDescriptionRouteAdapter
(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic RouteAdapter
apply
(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) static Route
asJava
(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) Java DSL: Adapt an existing ScalaDSL Route as an Java DSL Routescala.Function1<RequestContext,
scala.concurrent.Future<RouteResult>> delegate()
INTERNAL APIakka.stream.javadsl.Flow<HttpRequest,
HttpResponse, akka.NotUsed> flow
(akka.actor.ActorSystem system, akka.stream.Materializer materializer) akka.japi.function.Function<HttpRequest,
CompletionStage<HttpResponse>> handler
(akka.actor.ClassicActorSystemProvider system) seal()
Seals a route by wrapping it with default exception handling and rejection conversion.seal
(RejectionHandler rejectionHandler, ExceptionHandler exceptionHandler) Seals a route by wrapping it with explicit exception handling and rejection conversion.toString()
-
Constructor Details
-
RouteAdapter
-
-
Method Details
-
apply
public static RouteAdapter apply(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) -
asJava
public static Route asJava(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) Java DSL: Adapt an existing ScalaDSL Route as an Java DSL Route -
delegate
Description copied from interface:Route
INTERNAL API -
flow
public akka.stream.javadsl.Flow<HttpRequest,HttpResponse, flowakka.NotUsed> (akka.actor.ActorSystem system, akka.stream.Materializer materializer) -
handler
public akka.japi.function.Function<HttpRequest,CompletionStage<HttpResponse>> handler(akka.actor.ClassicActorSystemProvider system) - Specified by:
handler
in interfaceHandlerProvider
- Specified by:
handler
in interfaceRoute
-
orElse
-
seal
Description copied from interface:Route
Seals a route by wrapping it with default exception handling and rejection conversion.A sealed route has these properties: - The result of the route will always be a complete response, i.e. the result of the future is a
Success(RouteResult.Complete(response))
, never a failed future and never a rejected route. These will be already be handled using the defaultRejectionHandler
andExceptionHandler
. - Consequently, no route alternatives will be tried that were combined with this route. -
seal
Description copied from interface:Route
Seals a route by wrapping it with explicit exception handling and rejection conversion.A sealed route has these properties: - The result of the route will always be a complete response, i.e. the result of the future is a
Success(RouteResult.Complete(response))
, never a failed future and never a rejected route. These will be already be handled using the givenRejectionHandler
andExceptionHandler
. - Consequently, no route alternatives will be tried that were combined with this route. -
toString
-