Class ThrottlingServiceBuilder
java.lang.Object
com.linecorp.armeria.server.throttling.ThrottlingServiceBuilder
Builds a new
ThrottlingService
.-
Method Summary
Modifier and TypeMethodDescriptionbuild
(HttpService delegate) Returns a newly-createdThrottlingService
based on theThrottlingStrategy
s added to this builder.Function<? super HttpService,
ThrottlingService> Returns a newly-created decorator that decorates anService
with a newThrottlingService
based on theThrottlingStrategy
s added to this builder.onAcceptedRequest
(ThrottlingAcceptHandler<HttpRequest, HttpResponse> acceptHandler) SetsThrottlingAcceptHandler
.onRejectedRequest
(ThrottlingRejectHandler<HttpRequest, HttpResponse> rejectHandler) SetsThrottlingRejectHandler
.
-
Method Details
-
onAcceptedRequest
public ThrottlingServiceBuilder onAcceptedRequest(ThrottlingAcceptHandler<HttpRequest, HttpResponse> acceptHandler) SetsThrottlingAcceptHandler
. -
onRejectedRequest
public ThrottlingServiceBuilder onRejectedRequest(ThrottlingRejectHandler<HttpRequest, HttpResponse> rejectHandler) SetsThrottlingRejectHandler
. -
build
Returns a newly-createdThrottlingService
based on theThrottlingStrategy
s added to this builder. -
newDecorator
Returns a newly-created decorator that decorates anService
with a newThrottlingService
based on theThrottlingStrategy
s added to this builder.
-