public static final class CallOptions.Key<T>
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static <T> CallOptions.Key<T> |
create(java.lang.String debugString) |
Factory method for creating instances of
CallOptions.Key . |
static <T> CallOptions.Key<T> |
createWithDefault(java.lang.String debugString,
T defaultValue) |
Factory method for creating instances of
CallOptions.Key . |
T |
getDefault() |
Returns the user supplied default value for this key.
|
static <T> CallOptions.Key<T> |
of(java.lang.String debugString,
T defaultValue) |
Deprecated.
Use
create(java.lang.String) or createWithDefault(java.lang.String, T) instead. |
java.lang.String |
toString() |
public T getDefault()
public java.lang.String toString()
toString
in class java.lang.Object
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1869") @Deprecated public static <T> CallOptions.Key<T> of(java.lang.String debugString, T defaultValue)
create(java.lang.String)
or createWithDefault(java.lang.String, T)
instead. This method will
be removed.CallOptions.Key
.T
- Key typedebugString
- a string used to describe this key, used for debugging.defaultValue
- default value to return when value for key not setpublic static <T> CallOptions.Key<T> create(java.lang.String debugString)
CallOptions.Key
. The default value of the
key is null
.T
- Key typedebugString
- a debug string that describes this key.public static <T> CallOptions.Key<T> createWithDefault(java.lang.String debugString, T defaultValue)
CallOptions.Key
.T
- Key typedebugString
- a debug string that describes this key.defaultValue
- default value to return when value for key not set