Class RejectionHandler.Builder
java.lang.Object
org.apache.pekko.http.scaladsl.server.RejectionHandler.Builder
- Enclosing interface:
- RejectionHandler
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionhandle(scala.PartialFunction<Rejection, scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>>> pf) Handles a singleRejectionwith the given partial function.<T extends Rejection>
 RejectionHandler.BuilderhandleAll(scala.Function1<scala.collection.immutable.Seq<T>, scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>>> f, scala.reflect.ClassTag<T> evidence$1) Handles several Rejections of the same type at the same time.handleCircuitBreakerOpenRejection(scala.Function1<CircuitBreakerOpenRejection, scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>>> handler) Convenience method for handling rejections created by the onCompleteWithBreaker directive.handleNotFound(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> route) Handles the special "not found" case using the givenRoute.result()
- 
Constructor Details- 
Builderpublic Builder(boolean isDefault) 
 
- 
- 
Method Details- 
handlepublic RejectionHandler.Builder handle(scala.PartialFunction<Rejection, scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>>> pf) Handles a singleRejectionwith the given partial function.- Parameters:
- pf- (undocumented)
- Returns:
- (undocumented)
 
- 
handleAllpublic <T extends Rejection> RejectionHandler.Builder handleAll(scala.Function1<scala.collection.immutable.Seq<T>, scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>>> f, scala.reflect.ClassTag<T> evidence$1) Handles several Rejections of the same type at the same time. The seq passed to the given function is guaranteed to be non-empty.- Parameters:
- f- (undocumented)
- evidence$1- (undocumented)
- Returns:
- (undocumented)
 
- 
handleCircuitBreakerOpenRejectionpublic RejectionHandler.Builder handleCircuitBreakerOpenRejection(scala.Function1<CircuitBreakerOpenRejection, scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>>> handler) Convenience method for handling rejections created by the onCompleteWithBreaker directive. Signals that the request was rejected because the supplied circuit breaker is open and requests are failing fast.Use to customise the error response being written instead of the default ServiceUnavailableresponse.- Parameters:
- handler- (undocumented)
- Returns:
- (undocumented)
 
- 
handleNotFoundpublic RejectionHandler.Builder handleNotFound(scala.Function1<RequestContext, scala.concurrent.Future<RouteResult>> route) Handles the special "not found" case using the givenRoute.- Parameters:
- route- (undocumented)
- Returns:
- (undocumented)
 
- 
result
 
-