@Test public void withExecutor() { NoopStub stub = new NoopStub(channel); CallOptions callOptions = stub.getCallOptions(); assertNull(callOptions.getExecutor()); Executor executor = mock(Executor.class); stub = stub.withExecutor(executor); callOptions = stub.getCallOptions(); assertEquals(callOptions.getExecutor(), executor); }
public final S withExecutor(Executor executor) { return build(channel, callOptions.withExecutor(executor)); }
AbstractStub { public final S withExecutor(Executor executor) { return build(channel, callOptions.withExecutor(executor)); } }
AbstractStub { public final S withExecutor(Executor executor) { return build(channel, callOptions.withExecutor(executor)); } protected  AbstractStub(Channel channel); protected  AbstractStub(Channel channel, CallOptions callOptions); }
AbstractStub { public final S withExecutor(Executor executor) { return build(channel, callOptions.withExecutor(executor)); } protected  AbstractStub(Channel channel); protected  AbstractStub(Channel channel, CallOptions callOptions); final Channel getChannel(); final CallOptions getCallOptions(); final S withDeadline(@Nullable Deadline deadline); final S withDeadlineAfter(long duration, TimeUnit unit); final S withExecutor(Executor executor); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") final S withCompression(String compressorName); @Deprecated // use withInterceptors() instead final S withChannel(Channel newChannel); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1869") final S withOption(CallOptions.Key<T> key, T value); final S withInterceptors(ClientInterceptor... interceptors); final S withCallCredentials(CallCredentials credentials); final S withWaitForReady(); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2563") final S withMaxInboundMessageSize(int maxSize); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2563") final S withMaxOutboundMessageSize(int maxSize); }
AbstractStub { public final S withExecutor(Executor executor) { return build(channel, callOptions.withExecutor(executor)); } protected  AbstractStub(Channel channel); protected  AbstractStub(Channel channel, CallOptions callOptions); final Channel getChannel(); final CallOptions getCallOptions(); final S withDeadline(@Nullable Deadline deadline); final S withDeadlineAfter(long duration, TimeUnit unit); final S withExecutor(Executor executor); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") final S withCompression(String compressorName); @Deprecated // use withInterceptors() instead final S withChannel(Channel newChannel); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1869") final S withOption(CallOptions.Key<T> key, T value); final S withInterceptors(ClientInterceptor... interceptors); final S withCallCredentials(CallCredentials credentials); final S withWaitForReady(); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2563") final S withMaxInboundMessageSize(int maxSize); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2563") final S withMaxOutboundMessageSize(int maxSize);  }