Interface TimeoutAccess

All Known Subinterfaces:
TimeoutAccess

@DoNotInherit public interface TimeoutAccess
Enables programmatic access to the server-side request timeout logic. Not for user extension.
  • Method Summary

    Modifier and Type
    Method
    Description
    scala.concurrent.duration.Duration
    Returns the currently set timeout.
    void
    update(scala.concurrent.duration.Duration timeout, akka.japi.Function<HttpRequest,HttpResponse> handler)
    Tries to set a new timeout and handler at the same time.
    void
    updateHandler(akka.japi.Function<HttpRequest,HttpResponse> handler)
    Tries to set a new timeout handler, which produces the timeout response for a given request.
    void
    updateTimeout(scala.concurrent.duration.Duration timeout)
    Tries to set a new timeout.
  • Method Details

    • getTimeout

      scala.concurrent.duration.Duration getTimeout()
      Returns the currently set timeout. The timeout period is measured as of the point in time that the end of the request has been received, which may be in the past or in the future! Due to the inherent raciness it is not guaranteed that the returned timeout was applied before the previously set timeout has expired!
    • updateTimeout

      void updateTimeout(scala.concurrent.duration.Duration timeout)
      Tries to set a new timeout. The timeout period is measured as of the point in time that the end of the request has been received, which may be in the past or in the future! Use `Duration.Inf` to completely disable request timeout checking for this request. Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!
    • updateHandler

      void updateHandler(akka.japi.Function<HttpRequest,HttpResponse> handler)
      Tries to set a new 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!
    • update

      void update(scala.concurrent.duration.Duration timeout, akka.japi.Function<HttpRequest,HttpResponse> handler)
      Tries to set a new timeout and handler 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!