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