Class RejectionHandler.Builder

  • Enclosing interface:
    RejectionHandler

    public static final class RejectionHandler.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder​(boolean isDefault)
    • Method Detail

      • handleAll

        public <T extends RejectionRejectionHandler.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)
      • handleCircuitBreakerOpenRejection

        public 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 ServiceUnavailable response.

        Parameters:
        handler - (undocumented)
        Returns:
        (undocumented)