Class ThrottlingRpcServiceBuilder
java.lang.Object
com.linecorp.armeria.server.throttling.ThrottlingRpcServiceBuilder
Builds a new
ThrottlingRpcService
.-
Method Summary
Modifier and TypeMethodDescriptionbuild
(RpcService delegate) Returns a newly-createdThrottlingRpcService
based on theThrottlingStrategy
s added to this builder.Function<? super RpcService,
ThrottlingRpcService> Returns a newly-created decorator that decorates anService
with a newThrottlingService
based on theThrottlingStrategy
s added to this builder.onAcceptedRequest
(ThrottlingAcceptHandler<RpcRequest, RpcResponse> acceptHandler) SetsThrottlingAcceptHandler
.onRejectedRequest
(ThrottlingRejectHandler<RpcRequest, RpcResponse> rejectHandler) SetsThrottlingRejectHandler
.
-
Method Details
-
onAcceptedRequest
public ThrottlingRpcServiceBuilder onAcceptedRequest(ThrottlingAcceptHandler<RpcRequest, RpcResponse> acceptHandler) SetsThrottlingAcceptHandler
. -
onRejectedRequest
public ThrottlingRpcServiceBuilder onRejectedRequest(ThrottlingRejectHandler<RpcRequest, RpcResponse> rejectHandler) SetsThrottlingRejectHandler
. -
build
Returns a newly-createdThrottlingRpcService
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.
-