public class ClientInterceptors extends Object
ClientInterceptor
s.Modifier and Type | Class and Description |
---|---|
static class |
ClientInterceptors.CheckedForwardingClientCall<ReqT,RespT>
A
ForwardingClientCall that delivers exceptions from its start logic to the
call listener. |
Modifier and Type | Method and Description |
---|---|
static Channel |
intercept(Channel channel,
ClientInterceptor... interceptors)
Create a new
Channel that will call interceptors before starting a call on the
given channel. |
static Channel |
intercept(Channel channel,
List<? extends ClientInterceptor> interceptors)
Create a new
Channel that will call interceptors before starting a call on the
given channel. |
static Channel |
interceptForward(Channel channel,
ClientInterceptor... interceptors)
Create a new
Channel that will call interceptors before starting a call on the
given channel. |
static Channel |
interceptForward(Channel channel,
List<? extends ClientInterceptor> interceptors)
Create a new
Channel that will call interceptors before starting a call on the
given channel. |
public static Channel interceptForward(Channel channel, ClientInterceptor... interceptors)
Channel
that will call interceptors
before starting a call on the
given channel. The first interceptor will have its ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel)
called first.channel
- the underlying channel to intercept.interceptors
- array of interceptors to bind to channel
.public static Channel interceptForward(Channel channel, List<? extends ClientInterceptor> interceptors)
Channel
that will call interceptors
before starting a call on the
given channel. The first interceptor will have its ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel)
called first.channel
- the underlying channel to intercept.interceptors
- a list of interceptors to bind to channel
.public static Channel intercept(Channel channel, ClientInterceptor... interceptors)
Channel
that will call interceptors
before starting a call on the
given channel. The last interceptor will have its ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel)
called first.channel
- the underlying channel to intercept.interceptors
- array of interceptors to bind to channel
.public static Channel intercept(Channel channel, List<? extends ClientInterceptor> interceptors)
Channel
that will call interceptors
before starting a call on the
given channel. The last interceptor will have its ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel)
called first.channel
- the underlying channel to intercept.interceptors
- a list of interceptors to bind to channel
.