Class RejectionHandlerBuilder
java.lang.Object
org.apache.pekko.http.javadsl.server.RejectionHandlerBuilder
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()<T extends Rejection>
 RejectionHandlerBuilderHandles a singleRejectionwith the given function.<T extends Rejection>
 RejectionHandlerBuilderHandles several Rejections of the same type at the same time.Convenience method for handling rejections created by created by the onCompleteWithBreaker directive.handleNotFound(Route route) Handles the special "not found" case using the givenRoute.
- 
Constructor Details- 
RejectionHandlerBuilder
 
- 
- 
Method Details- 
build
- 
handleHandles a singleRejectionwith the given function.- Parameters:
- t- (undocumented)
- handler- (undocumented)
- Returns:
- (undocumented)
 
- 
handleAllpublic <T extends Rejection> RejectionHandlerBuilder handleAll(Class<T> t, Function<List<T>, Route> handler) Handles several Rejections of the same type at the same time. The list passed to the given function is guaranteed to be non-empty.- Parameters:
- t- (undocumented)
- handler- (undocumented)
- Returns:
- (undocumented)
 
- 
handleCircuitBreakerOpenRejectionpublic RejectionHandlerBuilder handleCircuitBreakerOpenRejection(Function<CircuitBreakerOpenRejection, Route> handler) Convenience method for handling rejections created by 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 pekko.http.javadsl.model.StatusCodes.SERVICE_UNAVAILABLEresponse.- Parameters:
- handler- (undocumented)
- Returns:
- (undocumented)
 
- 
handleNotFoundHandles the special "not found" case using the givenRoute.- Parameters:
- route- (undocumented)
- Returns:
- (undocumented)
 
 
-