@Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(final MethodDescriptor<ReqT, RespT> method, final CallOptions callOptions, final Channel next) { return next.newCall(method, callOptions.withCallCredentials(this.credentials)); }
@Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(final MethodDescriptor<ReqT, RespT> method, final CallOptions callOptions, final Channel next) { return next.newCall(method, callOptions.withCallCredentials(this.credentials)); }
/** * Returns a new stub that uses the given call credentials. * * @since 1.0.0 */ public final S withCallCredentials(CallCredentials credentials) { return build(channel, callOptions.withCallCredentials(credentials)); }
@Override public GrpcCallContext withCredentials(Credentials newCredentials) { Preconditions.checkNotNull(newCredentials); CallCredentials callCredentials = MoreCallCredentials.from(newCredentials); return withCallOptions(callOptions.withCallCredentials(callCredentials)); }
private void reauthenticate(CallOptions failedOpts) { // assert name != null && password != null; if(getCallOptions() != failedOpts) return; // obj identity comparison intentional synchronized(this) { CallOptions callOpts = getCallOptions(); if(callOpts != failedOpts) return; callOptions = callOpts.withCallCredentials(refreshCreds.get()); } }
@Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) { if (!status.isOk()) { return new FailingClientCall<>(status); } return next.newCall(method, callOptions.withCallCredentials(credentials)); } }
@Override public GrpcCallContext withCredentials(Credentials newCredentials) { Preconditions.checkNotNull(newCredentials); CallCredentials callCredentials = MoreCallCredentials.from(newCredentials); return withCallOptions(callOptions.withCallCredentials(callCredentials)); }
@Bean @ConditionalOnMissingBean StorageComponent storage( @Value("${zipkin.storage.strict-trace-id:true}") boolean strictTraceId, @Qualifier("projectId") String projectId, ManagedChannel managedChannel, Credentials credentials) { return StackdriverStorage.newBuilder(managedChannel) .projectId(projectId) .strictTraceId(strictTraceId) .callOptions(DEFAULT.withCallCredentials(MoreCallCredentials.from(credentials))) .build(); }
grpcCallContext .callOptions .withCallCredentials(newCallCredentials) .withDeadline(newDeadline);
grpcCallContext .callOptions .withCallCredentials(newCallCredentials) .withDeadline(newDeadline);
throws IOException { CallOptions callOptions = CallOptions.DEFAULT .withCallCredentials( MoreCallCredentials.from( this.finalCredentialsProvider.getCredentials()))