Constructor and Description |
---|
RouteAdapter(scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> delegate) |
Modifier and Type | Method and Description |
---|---|
static RouteAdapter |
apply(scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> delegate) |
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
delegate()
INTERNAL API
|
akka.stream.javadsl.Flow<HttpRequest,HttpResponse,akka.NotUsed> |
flow(akka.actor.ActorSystem system,
akka.stream.Materializer materializer) |
Route |
orElse(Route alternative) |
Route |
seal(akka.actor.ActorSystem system,
akka.stream.Materializer materializer)
Seals a route by wrapping it with default exception handling and rejection conversion.
|
Route |
seal(RoutingSettings routingSettings,
ParserSettings parserSettings,
RejectionHandler rejectionHandler,
ExceptionHandler exceptionHandler,
akka.actor.ActorSystem system,
akka.stream.Materializer materializer)
Seals a route by wrapping it with explicit exception handling and rejection conversion.
|
java.lang.String |
toString() |
public RouteAdapter(scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> delegate)
public static RouteAdapter apply(scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> delegate)
public scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> delegate()
Route
public akka.stream.javadsl.Flow<HttpRequest,HttpResponse,akka.NotUsed> flow(akka.actor.ActorSystem system, akka.stream.Materializer materializer)
public Route seal(akka.actor.ActorSystem system, akka.stream.Materializer materializer)
Route
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 implicitly given
RejectionHandler
and ExceptionHandler
(or
the default handlers if none are given or can be found implicitly).
- Consequently, no route alternatives will be tried that were combined with this route.
public Route seal(RoutingSettings routingSettings, ParserSettings parserSettings, RejectionHandler rejectionHandler, ExceptionHandler exceptionHandler, akka.actor.ActorSystem system, akka.stream.Materializer materializer)
Route
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 implicitly given
RejectionHandler
and ExceptionHandler
(or
the default handlers if none are given or can be found implicitly).
- Consequently, no route alternatives will be tried that were combined with this route.
public java.lang.String toString()
toString
in class java.lang.Object