Class TimeoutDirectives

Direct Known Subclasses:
FramedEntityStreamingDirectives

public abstract class TimeoutDirectives extends WebSocketDirectives
  • Constructor Details

    • TimeoutDirectives

      public TimeoutDirectives()
  • Method Details

    • extractRequestTimeout

      public RouteAdapter extractRequestTimeout(Function<scala.concurrent.duration.Duration,Route> inner)
    • withRequestTimeout

      public RouteAdapter withRequestTimeout(scala.concurrent.duration.Duration timeout, Supplier<Route> inner)
      Tries to set a new request timeout and handler (if provided) at the same time.

      Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!

      Parameters:
      timeout - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • withRequestTimeout

      public RouteAdapter withRequestTimeout(scala.concurrent.duration.Duration timeout, Function<HttpRequest,HttpResponse> timeoutHandler, Supplier<Route> inner)
      Tries to set a new request timeout and handler (if provided) at the same time.

      Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!

      Parameters:
      timeout - (undocumented)
      timeoutHandler - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • withRequestTimeoutResponse

      public RouteAdapter withRequestTimeoutResponse(Function<HttpRequest,HttpResponse> timeoutHandler, Supplier<Route> inner)
      Tries to set a new request timeout handler, which produces the timeout response for a given request. Note that the handler must produce the response synchronously and shouldn't block!

      Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!

      Parameters:
      timeoutHandler - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • withoutRequestTimeout

      public RouteAdapter withoutRequestTimeout(Supplier<Route> inner)