public static Channel intercept(Channel channel, List<? extends ClientInterceptor> interceptors) {
    Preconditions.checkNotNull(channel, "channel");
    for (ClientInterceptor interceptor : interceptors) {
      channel = new InterceptorChannel(channel, interceptor);
    }
    return channel;
  }
public static Channel intercept ( Channel channel , List < ? extends ClientInterceptor > interceptors ) { Preconditions . checkNotNull ( channel , "channel" ) ; for ( ClientInterceptor interceptor : interceptors ) { channel = new InterceptorChannel ( channel , interceptor ) ; } return channel ; }
Create a new {@link Channel} that will call {@code interceptors} before starting a call on the
given channel. The last interceptor will have its {@link ClientInterceptor#interceptCall}
called first.

@param channel the underlying channel to intercept.
@param interceptors a list of interceptors to bind to {@code channel}.
@return a new channel instance with the interceptors applied.