CallCredentials
. Implementations
should switch back to "extends CallCredentials
".@Deprecated @ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/4901") public abstract class CallCredentials2 extends CallCredentials
CallCredentials
.
THIS CLASS NAME IS TEMPORARY and is part of a migration. This class will BE DELETED as it
replaces CallCredentials
in short-term. THIS CLASS IS ONLY REFERENCED BY IMPLEMENTIONS.
All consumers should be always referencing CallCredentials
.
Modifier and Type | Class and Description |
---|---|
static class |
CallCredentials2.MetadataApplier
Deprecated.
|
CallCredentials.RequestInfo
Constructor and Description |
---|
CallCredentials2()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
applyRequestMetadata(CallCredentials.RequestInfo requestInfo,
Executor appExecutor,
CallCredentials.MetadataApplier applier)
Deprecated.
Pass the credential data to the given
CallCredentials.MetadataApplier , which will
propagate it to the request metadata. |
abstract void |
applyRequestMetadata(CallCredentials.RequestInfo requestInfo,
Executor appExecutor,
CallCredentials2.MetadataApplier applier)
Deprecated.
Pass the credential data to the given
CallCredentials2.MetadataApplier , which will propagate it to the
request metadata. |
thisUsesUnstableApi
@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1914") public abstract void applyRequestMetadata(CallCredentials.RequestInfo requestInfo, Executor appExecutor, CallCredentials2.MetadataApplier applier)
CallCredentials2.MetadataApplier
, which will propagate it to the
request metadata.
It is called for each individual RPC, within the Context
of the call, before the
stream is about to be created on a transport. Implementations should not block in this
method. If metadata is not immediately available, e.g., needs to be fetched from network, the
implementation may give the applier
to an asynchronous task which will eventually call
the applier
. The RPC proceeds only after the applier
is called.
requestInfo
- request-related informationappExecutor
- The application thread-pool. It is provided to the implementation in case it
needs to perform blocking operations.applier
- The outlet of the produced headers. It can be called either before or after this
method returns.public final void applyRequestMetadata(CallCredentials.RequestInfo requestInfo, Executor appExecutor, CallCredentials.MetadataApplier applier)
CallCredentials
CallCredentials.MetadataApplier
, which will
propagate it to the request metadata.
It is called for each individual RPC, within the Context
of the call, before the
stream is about to be created on a transport. Implementations should not block in this
method. If metadata is not immediately available, e.g., needs to be fetched from network, the
implementation may give the applier
to an asynchronous task which will eventually call
the applier
. The RPC proceeds only after the applier
is called.
applyRequestMetadata
in class CallCredentials
requestInfo
- request-related informationappExecutor
- The application thread-pool. It is provided to the implementation in case it
needs to perform blocking operations.applier
- The outlet of the produced headers. It can be called either before or after this
method returns.