Class RouteAdapter
- All Implemented Interfaces:
- HandlerProvider,- Route
- 
Constructor SummaryConstructorsConstructorDescriptionRouteAdapter(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic RouteAdapterapply(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) static RouteasJava(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 APIorg.apache.pekko.stream.javadsl.Flow<HttpRequest,HttpResponse, org.apache.pekko.NotUsed> flow(org.apache.pekko.actor.ActorSystem system, org.apache.pekko.stream.Materializer materializer) org.apache.pekko.japi.function.Function<HttpRequest,CompletionStage<HttpResponse>> handler(org.apache.pekko.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- 
applypublic static RouteAdapter apply(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) 
- 
asJavapublic static Route asJava(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> delegate) Java DSL: Adapt an existing ScalaDSL Route as an Java DSL Route
- 
delegateDescription copied from interface:RouteINTERNAL API
- 
flowpublic org.apache.pekko.stream.javadsl.Flow<HttpRequest,HttpResponse, floworg.apache.pekko.NotUsed> (org.apache.pekko.actor.ActorSystem system, org.apache.pekko.stream.Materializer materializer) 
- 
handlerpublic org.apache.pekko.japi.function.Function<HttpRequest,CompletionStage<HttpResponse>> handler(org.apache.pekko.actor.ClassicActorSystemProvider system) - Specified by:
- handlerin interface- HandlerProvider
- Specified by:
- handlerin interface- Route
 
- 
orElse
- 
sealDescription copied from interface:RouteSeals 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 defaultRejectionHandlerandExceptionHandler. - Consequently, no route alternatives will be tried that were combined with this route.
- 
sealDescription copied from interface:RouteSeals 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 givenRejectionHandlerandExceptionHandler. - Consequently, no route alternatives will be tried that were combined with this route.
- 
toString
 
-