Class DeadlineClientInterceptor
- java.lang.Object
-
- yandex.cloud.sdk.grpc.interceptors.DeadlineClientInterceptor
-
- All Implemented Interfaces:
io.grpc.ClientInterceptor
public class DeadlineClientInterceptor extends Object implements io.grpc.ClientInterceptor
An interceptor that enforces given deadline for a call.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeadlineClientInterceptorfromDuration(Duration timeout)Create aDeadlineClientInterceptorwith given timeout<ReqT,RespT>
io.grpc.ClientCall<ReqT,RespT>interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)
-
-
-
Method Detail
-
interceptCall
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)- Specified by:
interceptCallin interfaceio.grpc.ClientInterceptor
-
fromDuration
public static DeadlineClientInterceptor fromDuration(Duration timeout)
Create aDeadlineClientInterceptorwith given timeout- Parameters:
timeout- timeout after which a call fails if it is still not completed- Returns:
DeadlineClientInterceptorobject
-
-