This is used by CallOptions#withCallCredentials and withCallCredentials() on
the generated stub, for example:
FooGrpc.FooStub stub = FooGrpc.newStub(channel); response = stub.withCallCredentials(creds).bar(request);
The contents and nature of this class (and whether it remains an abstract class) is
experimental, in that it can change. However, we are guaranteeing stability for the
name. That is, we are guaranteeing stability for code to be returned a reference and
pass that reference to gRPC for usage. However, code may not call or implement the CallCredentials itself if it wishes to only use stable APIs.
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | CallCredentials.MetadataApplier
The outlet of the produced headers. |
| public abstract static class | CallCredentials.RequestInfo
The request-related information passed to |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | applyRequestMetadata(CallCredentials.
request-related information requestInfo,The application thread-pool. It is provided to the implementation in case it
needs to perform blocking operations. appExecutor, CallCredentials.The outlet of the produced headers. It can be called either before or after this
method returns. applierPass the credential data to the given |
| public void | thisUsesUnstableApi()
Deprecated
With this class now being stable this method moves from an abstract one to a normal one with
a no-op implementation.
|
| CallCredentials | back to summary |
|---|---|
| public CallCredentials() | |
| applyRequestMetadata | back to summary |
|---|---|
| public abstract void applyRequestMetadata(CallCredentials. Pass the credential data to the given It is called for each individual RPC, within the
| |
| thisUsesUnstableApi | back to summary |
|---|---|
| public void thisUsesUnstableApi()
Deprecated
With this class now being stable this method moves from an abstract one to a normal one with a no-op implementation. This method is marked deprecated to allow extenders time to remove the method before it is removed here.
| |
Exactly one of its methods must be called to make the RPC proceed.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract void |
| MetadataApplier | back to summary |
|---|---|
| public MetadataApplier() | |
| apply | back to summary |
|---|---|
| public abstract void apply(Metadata headers) Called when headers are successfully generated. They will be merged into the original headers. | |
| fail | back to summary |
|---|---|
| public abstract void fail(Status status) Called when there has been an error when preparing the headers. This will fail the RPC. | |
CallCredentials.applyRequestMetadata().
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract String | |
| public CallOptions | |
| public abstract MethodDescriptor | |
| public abstract SecurityLevel | |
| public abstract Attributes |
| RequestInfo | back to summary |
|---|---|
| public RequestInfo() | |
| getAuthority | back to summary |
|---|---|
| public abstract String getAuthority() Returns the authority string used to authenticate the server for this call. | |
| getCallOptions | back to summary |
|---|---|
| public CallOptions getCallOptions() The call options used to call this RPC. | |
| getMethodDescriptor | back to summary |
|---|---|
| public abstract MethodDescriptor The method descriptor of this RPC. | |
| getSecurityLevel | back to summary |
|---|---|
| public abstract SecurityLevel getSecurityLevel() The security level on the transport. | |
| getTransportAttrs | back to summary |
|---|---|
| public abstract Attributes getTransportAttrs() Returns the transport attributes.
| |