Package com.google.api.gax.httpjson
Class HttpJsonCallContext
java.lang.Object
com.google.api.gax.httpjson.HttpJsonCallContext
- All Implemented Interfaces:
RetryingContext,ApiCallContext
@BetaApi("Reference ApiCallContext instead - this class is likely to experience breaking changes")
public final class HttpJsonCallContext
extends Object
implements ApiCallContext
HttpJsonCallContext encapsulates context data used to make an http-json call.
HttpJsonCallContext is immutable in the sense that none of its methods modifies the
HttpJsonCallContext itself or the underlying data. Methods of the form withX return
copies of the object, but with one field changed. The immutability and thread safety of the
arguments solely depends on the arguments themselves.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.api.gax.rpc.ApiCallContext
ApiCallContext.Key<T extends Object> -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpJsonCallContextReturns an empty instance.booleancom.google.auth.CredentialsDeprecated.org.threeten.bp.InstantDeprecated.<T> TgetOption(ApiCallContext.Key<T> key) org.threeten.bp.DurationThe stream idle timeout set for this context.org.threeten.bp.DurationThe stream wait timeout set for this context.org.threeten.bp.DurationinthashCode()merge(ApiCallContext inputCallContext) nullToSelf(ApiCallContext inputContext) Returns inputContext cast toHttpJsonCallContext, or an emptyHttpJsonCallContextif inputContext is null.static HttpJsonCallContextof(HttpJsonChannel channel, HttpJsonCallOptions options) withCallOptions(HttpJsonCallOptions newCallOptions) withChannel(HttpJsonChannel newChannel) withCredentials(com.google.auth.Credentials newCredentials) withDeadline(org.threeten.bp.Instant newDeadline) Deprecated.withExtraHeaders(Map<String, List<String>> extraHeaders) <T> ApiCallContextwithOption(ApiCallContext.Key<T> key, T value) withRetryableCodes(Set<StatusCode.Code> retryableCodes) withRetrySettings(RetrySettings retrySettings) withStreamIdleTimeout(org.threeten.bp.Duration streamIdleTimeout) withStreamWaitTimeout(org.threeten.bp.Duration streamWaitTimeout) withTimeout(org.threeten.bp.Duration timeout) withTracer(ApiTracer newTracer) withTransportChannel(TransportChannel inputChannel)
-
Method Details
-
createDefault
Returns an empty instance. -
of
-
nullToSelf
Returns inputContext cast toHttpJsonCallContext, or an emptyHttpJsonCallContextif inputContext is null.- Specified by:
nullToSelfin interfaceApiCallContext- Parameters:
inputContext- theApiCallContextto cast if it is not null
-
merge
- Specified by:
mergein interfaceApiCallContext
-
withCredentials
- Specified by:
withCredentialsin interfaceApiCallContext
-
withTransportChannel
- Specified by:
withTransportChannelin interfaceApiCallContext
-
withTimeout
- Specified by:
withTimeoutin interfaceApiCallContext
-
getTimeout
- Specified by:
getTimeoutin interfaceApiCallContext
-
withStreamWaitTimeout
public HttpJsonCallContext withStreamWaitTimeout(@Nullable org.threeten.bp.Duration streamWaitTimeout) - Specified by:
withStreamWaitTimeoutin interfaceApiCallContext
-
getStreamWaitTimeout
The stream wait timeout set for this context.- Specified by:
getStreamWaitTimeoutin interfaceApiCallContext- See Also:
-
withStreamIdleTimeout
public HttpJsonCallContext withStreamIdleTimeout(@Nullable org.threeten.bp.Duration streamIdleTimeout) - Specified by:
withStreamIdleTimeoutin interfaceApiCallContext
-
getStreamIdleTimeout
The stream idle timeout set for this context.- Specified by:
getStreamIdleTimeoutin interfaceApiCallContext- See Also:
-
withExtraHeaders
@BetaApi("The surface for extra headers is not stable yet and may change in the future.") public ApiCallContext withExtraHeaders(Map<String, List<String>> extraHeaders) - Specified by:
withExtraHeadersin interfaceApiCallContext
-
getExtraHeaders
@BetaApi("The surface for extra headers is not stable yet and may change in the future.") public Map<String,List<String>> getExtraHeaders()- Specified by:
getExtraHeadersin interfaceApiCallContext
-
withOption
- Specified by:
withOptionin interfaceApiCallContext
-
getOption
- Specified by:
getOptionin interfaceApiCallContext
-
getChannel
-
getCallOptions
-
getDeadline
Deprecated. -
getCredentials
Deprecated. -
getRetrySettings
- Specified by:
getRetrySettingsin interfaceRetryingContext
-
withRetrySettings
- Specified by:
withRetrySettingsin interfaceApiCallContext
-
getRetryableCodes
- Specified by:
getRetryableCodesin interfaceRetryingContext
-
withRetryableCodes
- Specified by:
withRetryableCodesin interfaceApiCallContext
-
withChannel
-
withCallOptions
-
withDeadline
Deprecated. -
getTracer
- Specified by:
getTracerin interfaceApiCallContext- Specified by:
getTracerin interfaceRetryingContext
-
withTracer
- Specified by:
withTracerin interfaceApiCallContext
-
equals
-
hashCode
public int hashCode()
-