@@ -112,7 +112,8 @@ public static GrpcCallContext createDefault() {
112112 ApiCallContextOptions.getDefaultOptions(),
113113 null,
114114 null,
115- null);
115+ null,
116+ false);
116117 }
117118
118119 /** Returns an instance with the given channel and {@link CallOptions}. */
@@ -129,35 +130,7 @@ public static GrpcCallContext of(Channel channel, CallOptions callOptions) {
129130 ApiCallContextOptions.getDefaultOptions(),
130131 null,
131132 null,
132- null);
133- }
134-
135- private GrpcCallContext(
136- Channel channel,
137- @Nullable Credentials credentials,
138- CallOptions callOptions,
139- @Nullable java.time.Duration timeout,
140- @Nullable java.time.Duration streamWaitTimeout,
141- @Nullable java.time.Duration streamIdleTimeout,
142- @Nullable Integer channelAffinity,
143- ImmutableMap<String, List<String>> extraHeaders,
144- ApiCallContextOptions options,
145- @Nullable RetrySettings retrySettings,
146- @Nullable Set<StatusCode.Code> retryableCodes,
147- @Nullable EndpointContext endpointContext) {
148- this(
149- channel,
150- credentials,
151- callOptions,
152- timeout,
153- streamWaitTimeout,
154- streamIdleTimeout,
155- channelAffinity,
156- extraHeaders,
157- options,
158- retrySettings,
159- retryableCodes,
160- endpointContext,
133+ null,
161134 false);
162135 }
163136
@@ -231,7 +204,8 @@ public GrpcCallContext withCredentials(Credentials newCredentials) {
231204 options,
232205 retrySettings,
233206 retryableCodes,
234- endpointContext);
207+ endpointContext,
208+ isDirectPath);
235209 }
236210
237211 @Override
@@ -273,7 +247,8 @@ public GrpcCallContext withEndpointContext(EndpointContext endpointContext) {
273247 options,
274248 retrySettings,
275249 retryableCodes,
276- endpointContext);
250+ endpointContext,
251+ isDirectPath);
277252 }
278253
279254 /** This method is obsolete. Use {@link #withTimeoutDuration(java.time.Duration)} instead. */
@@ -307,7 +282,8 @@ public GrpcCallContext withTimeoutDuration(@Nullable java.time.Duration timeout)
307282 options,
308283 retrySettings,
309284 retryableCodes,
310- endpointContext);
285+ endpointContext,
286+ isDirectPath);
311287 }
312288
313289 /** This method is obsolete. Use {@link #getTimeoutDuration()} instead. */
@@ -355,7 +331,8 @@ public GrpcCallContext withStreamWaitTimeoutDuration(
355331 options,
356332 retrySettings,
357333 retryableCodes,
358- endpointContext);
334+ endpointContext,
335+ isDirectPath);
359336 }
360337
361338 /**
@@ -389,7 +366,8 @@ public GrpcCallContext withStreamIdleTimeoutDuration(
389366 options,
390367 retrySettings,
391368 retryableCodes,
392- endpointContext);
369+ endpointContext,
370+ isDirectPath);
393371 }
394372
395373 @BetaApi("The surface for channel affinity is not stable yet and may change in the future.")
@@ -406,7 +384,8 @@ public GrpcCallContext withChannelAffinity(@Nullable Integer affinity) {
406384 options,
407385 retrySettings,
408386 retryableCodes,
409- endpointContext);
387+ endpointContext,
388+ isDirectPath);
410389 }
411390
412391 @BetaApi("The surface for extra headers is not stable yet and may change in the future.")
@@ -427,7 +406,8 @@ public GrpcCallContext withExtraHeaders(Map<String, List<String>> extraHeaders)
427406 options,
428407 retrySettings,
429408 retryableCodes,
430- endpointContext);
409+ endpointContext,
410+ isDirectPath);
431411 }
432412
433413 @Override
@@ -449,7 +429,8 @@ public GrpcCallContext withRetrySettings(RetrySettings retrySettings) {
449429 options,
450430 retrySettings,
451431 retryableCodes,
452- endpointContext);
432+ endpointContext,
433+ isDirectPath);
453434 }
454435
455436 @Override
@@ -471,7 +452,8 @@ public GrpcCallContext withRetryableCodes(Set<StatusCode.Code> retryableCodes) {
471452 options,
472453 retrySettings,
473454 retryableCodes,
474- endpointContext);
455+ endpointContext,
456+ isDirectPath);
475457 }
476458
477459 @Override
@@ -570,7 +552,8 @@ public ApiCallContext merge(ApiCallContext inputCallContext) {
570552 newOptions,
571553 newRetrySettings,
572554 newRetryableCodes,
573- endpointContext);
555+ endpointContext,
556+ isDirectPath);
574557 }
575558
576559 /** The {@link Channel} set on this context. */
@@ -649,7 +632,8 @@ public GrpcCallContext withChannel(Channel newChannel) {
649632 options,
650633 retrySettings,
651634 retryableCodes,
652- endpointContext);
635+ endpointContext,
636+ isDirectPath);
653637 }
654638
655639 /** Returns a new instance with the call options set to the given call options. */
@@ -666,7 +650,8 @@ public GrpcCallContext withCallOptions(CallOptions newCallOptions) {
666650 options,
667651 retrySettings,
668652 retryableCodes,
669- endpointContext);
653+ endpointContext,
654+ isDirectPath);
670655 }
671656
672657 public GrpcCallContext withRequestParamsDynamicHeaderOption(String requestParams) {
@@ -710,7 +695,8 @@ public <T> GrpcCallContext withOption(Key<T> key, T value) {
710695 newOptions,
711696 retrySettings,
712697 retryableCodes,
713- endpointContext);
698+ endpointContext,
699+ isDirectPath);
714700 }
715701
716702 /** {@inheritDoc} */
0 commit comments