Package com.google.api.gax.rpc.internal
Class ApiCallContextOptions
- java.lang.Object
-
- com.google.api.gax.rpc.internal.ApiCallContextOptions
-
@InternalApi public final class ApiCallContextOptions extends java.lang.Object
ApiCallContextOptions encapsulates additional call options to pass in aApiCallContext
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApiCallContextOptions
getDefaultOptions()
<T> T
getOption(ApiCallContext.Key<T> key)
Get an option.ApiCallContextOptions
merge(ApiCallContextOptions newOptions)
Merge new options into existing ones.<T> ApiCallContextOptions
withOption(ApiCallContext.Key<T> key, T value)
Add an option.
-
-
-
Method Detail
-
getDefaultOptions
public static ApiCallContextOptions getDefaultOptions()
-
withOption
public <T> ApiCallContextOptions withOption(ApiCallContext.Key<T> key, T value)
Add an option. Any existing value of the key is overwritten.
-
getOption
public <T> T getOption(ApiCallContext.Key<T> key)
Get an option.
-
merge
public ApiCallContextOptions merge(ApiCallContextOptions newOptions)
Merge new options into existing ones. Any existing values of the keys are overwritten.
-
-