Interface TimeoutDirectives
- All Known Subinterfaces:
- Directives
- All Known Implementing Classes:
- Directives$,- HttpApp,- TimeoutDirectives$
public interface TimeoutDirectives
- 
Method SummaryModifier and TypeMethodDescriptionDirective<scala.Tuple1<scala.concurrent.duration.Duration>>Return the currently set request timeout.Directive<scala.runtime.BoxedUnit>Directive<scala.runtime.BoxedUnit>withRequestTimeout(scala.concurrent.duration.Duration timeout) Tries to set a new request timeout and handler (if provided) at the same time.Directive<scala.runtime.BoxedUnit>withRequestTimeout(scala.concurrent.duration.Duration timeout, scala.Function1<HttpRequest, HttpResponse> handler) Tries to set a new request timeout and handler (if provided) at the same time.Directive<scala.runtime.BoxedUnit>withRequestTimeout(scala.concurrent.duration.Duration timeout, scala.Option<scala.Function1<HttpRequest, HttpResponse>> handler) Tries to set a new request timeout and handler (if provided) at the same time.Directive<scala.runtime.BoxedUnit>withRequestTimeoutResponse(scala.Function1<HttpRequest, HttpResponse> handler) Tries to set a new request timeout handler, which produces the timeout response for a given request.
- 
Method Details- 
extractRequestTimeoutDirective<scala.Tuple1<scala.concurrent.duration.Duration>> extractRequestTimeout()Return the currently set request timeout.Note that this may be changed in inner directives. - Returns:
- (undocumented)
 
- 
withoutRequestTimeoutDirective<scala.runtime.BoxedUnit> withoutRequestTimeout()- Returns:
- (undocumented)
 
- 
withRequestTimeoutTries 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)
- Returns:
- (undocumented)
 
- 
withRequestTimeoutDirective<scala.runtime.BoxedUnit> withRequestTimeout(scala.concurrent.duration.Duration timeout, scala.Function1<HttpRequest, HttpResponse> handler) 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:
- handler- optional custom "timeout response" function. If left None, the default timeout HttpResponse will be used.
- timeout- (undocumented)
- Returns:
- (undocumented)
 
- 
withRequestTimeoutDirective<scala.runtime.BoxedUnit> withRequestTimeout(scala.concurrent.duration.Duration timeout, scala.Option<scala.Function1<HttpRequest, HttpResponse>> handler) 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:
- handler- optional custom "timeout response" function. If left None, the default timeout HttpResponse will be used.
- timeout- (undocumented)
- Returns:
- (undocumented)
 
- 
withRequestTimeoutResponseDirective<scala.runtime.BoxedUnit> withRequestTimeoutResponse(scala.Function1<HttpRequest, HttpResponse> handler) 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:
- handler- (undocumented)
- Returns:
- (undocumented)
 
 
-