Package com.google.api.gax.httpjson
Class HttpJsonCallContext
- java.lang.Object
-
- com.google.api.gax.httpjson.HttpJsonCallContext
-
- All Implemented Interfaces:
com.google.api.gax.retrying.RetryingContext,com.google.api.gax.rpc.ApiCallContext
@BetaApi("Reference ApiCallContext instead - this class is likely to experience breaking changes") public final class HttpJsonCallContext extends Object implements com.google.api.gax.rpc.ApiCallContextHttpJsonCallContext 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
withXreturn 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
com.google.api.gax.rpc.ApiCallContext.Key<T extends Object>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HttpJsonCallContextcreateDefault()Returns an empty instance.booleanequals(Object o)HttpJsonCallOptionsgetCallOptions()HttpJsonChannelgetChannel()com.google.auth.CredentialsgetCredentials()Deprecated.org.threeten.bp.InstantgetDeadline()Deprecated.Map<String,List<String>>getExtraHeaders()<T> TgetOption(com.google.api.gax.rpc.ApiCallContext.Key<T> key)Set<com.google.api.gax.rpc.StatusCode.Code>getRetryableCodes()com.google.api.gax.retrying.RetrySettingsgetRetrySettings()org.threeten.bp.DurationgetStreamIdleTimeout()The stream idle timeout set for this context.org.threeten.bp.DurationgetStreamWaitTimeout()The stream wait timeout set for this context.org.threeten.bp.DurationgetTimeout()com.google.api.gax.tracing.ApiTracergetTracer()inthashCode()HttpJsonCallContextmerge(com.google.api.gax.rpc.ApiCallContext inputCallContext)HttpJsonCallContextnullToSelf(com.google.api.gax.rpc.ApiCallContext inputContext)Returns inputContext cast toHttpJsonCallContext, or an emptyHttpJsonCallContextif inputContext is null.static HttpJsonCallContextof(HttpJsonChannel channel, HttpJsonCallOptions options)HttpJsonCallContextwithCallOptions(HttpJsonCallOptions newCallOptions)HttpJsonCallContextwithChannel(HttpJsonChannel newChannel)HttpJsonCallContextwithCredentials(com.google.auth.Credentials newCredentials)HttpJsonCallContextwithDeadline(org.threeten.bp.Instant newDeadline)Deprecated.com.google.api.gax.rpc.ApiCallContextwithExtraHeaders(Map<String,List<String>> extraHeaders)<T> com.google.api.gax.rpc.ApiCallContextwithOption(com.google.api.gax.rpc.ApiCallContext.Key<T> key, T value)HttpJsonCallContextwithRetryableCodes(Set<com.google.api.gax.rpc.StatusCode.Code> retryableCodes)HttpJsonCallContextwithRetrySettings(com.google.api.gax.retrying.RetrySettings retrySettings)HttpJsonCallContextwithStreamIdleTimeout(org.threeten.bp.Duration streamIdleTimeout)HttpJsonCallContextwithStreamWaitTimeout(org.threeten.bp.Duration streamWaitTimeout)HttpJsonCallContextwithTimeout(org.threeten.bp.Duration timeout)HttpJsonCallContextwithTracer(com.google.api.gax.tracing.ApiTracer newTracer)HttpJsonCallContextwithTransportChannel(com.google.api.gax.rpc.TransportChannel inputChannel)
-
-
-
Method Detail
-
createDefault
public static HttpJsonCallContext createDefault()
Returns an empty instance.
-
of
public static HttpJsonCallContext of(HttpJsonChannel channel, HttpJsonCallOptions options)
-
nullToSelf
public HttpJsonCallContext nullToSelf(com.google.api.gax.rpc.ApiCallContext inputContext)
Returns inputContext cast toHttpJsonCallContext, or an emptyHttpJsonCallContextif inputContext is null.- Specified by:
nullToSelfin interfacecom.google.api.gax.rpc.ApiCallContext- Parameters:
inputContext- theApiCallContextto cast if it is not null
-
merge
public HttpJsonCallContext merge(com.google.api.gax.rpc.ApiCallContext inputCallContext)
- Specified by:
mergein interfacecom.google.api.gax.rpc.ApiCallContext
-
withCredentials
public HttpJsonCallContext withCredentials(com.google.auth.Credentials newCredentials)
- Specified by:
withCredentialsin interfacecom.google.api.gax.rpc.ApiCallContext
-
withTransportChannel
public HttpJsonCallContext withTransportChannel(com.google.api.gax.rpc.TransportChannel inputChannel)
- Specified by:
withTransportChannelin interfacecom.google.api.gax.rpc.ApiCallContext
-
withTimeout
public HttpJsonCallContext withTimeout(org.threeten.bp.Duration timeout)
- Specified by:
withTimeoutin interfacecom.google.api.gax.rpc.ApiCallContext
-
getTimeout
@Nullable public org.threeten.bp.Duration getTimeout()
- Specified by:
getTimeoutin interfacecom.google.api.gax.rpc.ApiCallContext
-
withStreamWaitTimeout
public HttpJsonCallContext withStreamWaitTimeout(@Nullable org.threeten.bp.Duration streamWaitTimeout)
- Specified by:
withStreamWaitTimeoutin interfacecom.google.api.gax.rpc.ApiCallContext
-
getStreamWaitTimeout
@Nullable public org.threeten.bp.Duration getStreamWaitTimeout()
The stream wait timeout set for this context.- Specified by:
getStreamWaitTimeoutin interfacecom.google.api.gax.rpc.ApiCallContext- See Also:
ApiCallContext.withStreamWaitTimeout(Duration)
-
withStreamIdleTimeout
public HttpJsonCallContext withStreamIdleTimeout(@Nullable org.threeten.bp.Duration streamIdleTimeout)
- Specified by:
withStreamIdleTimeoutin interfacecom.google.api.gax.rpc.ApiCallContext
-
getStreamIdleTimeout
@Nullable public org.threeten.bp.Duration getStreamIdleTimeout()
The stream idle timeout set for this context.- Specified by:
getStreamIdleTimeoutin interfacecom.google.api.gax.rpc.ApiCallContext- See Also:
ApiCallContext.withStreamIdleTimeout(Duration)
-
withExtraHeaders
@BetaApi("The surface for extra headers is not stable yet and may change in the future.") public com.google.api.gax.rpc.ApiCallContext withExtraHeaders(Map<String,List<String>> extraHeaders)- Specified by:
withExtraHeadersin interfacecom.google.api.gax.rpc.ApiCallContext
-
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 interfacecom.google.api.gax.rpc.ApiCallContext
-
withOption
public <T> com.google.api.gax.rpc.ApiCallContext withOption(com.google.api.gax.rpc.ApiCallContext.Key<T> key, T value)- Specified by:
withOptionin interfacecom.google.api.gax.rpc.ApiCallContext
-
getOption
public <T> T getOption(com.google.api.gax.rpc.ApiCallContext.Key<T> key)
- Specified by:
getOptionin interfacecom.google.api.gax.rpc.ApiCallContext
-
getChannel
public HttpJsonChannel getChannel()
-
getCallOptions
public HttpJsonCallOptions getCallOptions()
-
getDeadline
@Deprecated @Nullable public org.threeten.bp.Instant getDeadline()
Deprecated.
-
getCredentials
@Deprecated @Nullable public com.google.auth.Credentials getCredentials()
Deprecated.
-
getRetrySettings
public com.google.api.gax.retrying.RetrySettings getRetrySettings()
- Specified by:
getRetrySettingsin interfacecom.google.api.gax.retrying.RetryingContext
-
withRetrySettings
public HttpJsonCallContext withRetrySettings(com.google.api.gax.retrying.RetrySettings retrySettings)
- Specified by:
withRetrySettingsin interfacecom.google.api.gax.rpc.ApiCallContext
-
getRetryableCodes
public Set<com.google.api.gax.rpc.StatusCode.Code> getRetryableCodes()
- Specified by:
getRetryableCodesin interfacecom.google.api.gax.retrying.RetryingContext
-
withRetryableCodes
public HttpJsonCallContext withRetryableCodes(Set<com.google.api.gax.rpc.StatusCode.Code> retryableCodes)
- Specified by:
withRetryableCodesin interfacecom.google.api.gax.rpc.ApiCallContext
-
withChannel
public HttpJsonCallContext withChannel(HttpJsonChannel newChannel)
-
withCallOptions
public HttpJsonCallContext withCallOptions(HttpJsonCallOptions newCallOptions)
-
withDeadline
@Deprecated public HttpJsonCallContext withDeadline(org.threeten.bp.Instant newDeadline)
Deprecated.
-
getTracer
@Nonnull public com.google.api.gax.tracing.ApiTracer getTracer()
- Specified by:
getTracerin interfacecom.google.api.gax.rpc.ApiCallContext- Specified by:
getTracerin interfacecom.google.api.gax.retrying.RetryingContext
-
withTracer
public HttpJsonCallContext withTracer(@Nonnull com.google.api.gax.tracing.ApiTracer newTracer)
- Specified by:
withTracerin interfacecom.google.api.gax.rpc.ApiCallContext
-
-