Class CallCredentials2
- java.lang.Object
-
- io.grpc.CallCredentials
-
- io.grpc.CallCredentials2
-
@Deprecated @ExperimentalApi("https://github.com/grpc/grpc-java/issues/4901") public abstract class CallCredentials2 extends CallCredentials
Deprecated.the new interface has been promoted intoCallCredentials. Implementations should switch back to "extends CallCredentials".The new interface forCallCredentials.THIS CLASS NAME IS TEMPORARY and is part of a migration. This class will BE DELETED as it replaces
CallCredentialsin short-term. THIS CLASS IS ONLY REFERENCED BY IMPLEMENTIONS. All consumers should be always referencingCallCredentials.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCallCredentials2.MetadataApplierDeprecated.-
Nested classes/interfaces inherited from class io.grpc.CallCredentials
CallCredentials.RequestInfo
-
-
Constructor Summary
Constructors Constructor Description CallCredentials2()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidapplyRequestMetadata(CallCredentials.RequestInfo requestInfo, java.util.concurrent.Executor appExecutor, CallCredentials.MetadataApplier applier)Deprecated.Pass the credential data to the givenCallCredentials.MetadataApplier, which will propagate it to the request metadata.abstract voidapplyRequestMetadata(CallCredentials.RequestInfo requestInfo, java.util.concurrent.Executor appExecutor, CallCredentials2.MetadataApplier applier)Deprecated.Pass the credential data to the givenCallCredentials2.MetadataApplier, which will propagate it to the request metadata.-
Methods inherited from class io.grpc.CallCredentials
thisUsesUnstableApi
-
-
-
-
Method Detail
-
applyRequestMetadata
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1914") public abstract void applyRequestMetadata(CallCredentials.RequestInfo requestInfo, java.util.concurrent.Executor appExecutor, CallCredentials2.MetadataApplier applier)
Deprecated.Pass the credential data to the givenCallCredentials2.MetadataApplier, which will propagate it to the request metadata.It is called for each individual RPC, within the
Contextof 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 theapplierto an asynchronous task which will eventually call theapplier. The RPC proceeds only after theapplieris called.- Parameters:
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.
-
applyRequestMetadata
public final void applyRequestMetadata(CallCredentials.RequestInfo requestInfo, java.util.concurrent.Executor appExecutor, CallCredentials.MetadataApplier applier)
Deprecated.Description copied from class:CallCredentialsPass the credential data to the givenCallCredentials.MetadataApplier, which will propagate it to the request metadata.It is called for each individual RPC, within the
Contextof 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 theapplierto an asynchronous task which will eventually call theapplier. The RPC proceeds only after theapplieris called.- Specified by:
applyRequestMetadatain classCallCredentials- Parameters:
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.
-
-