mirror of https://github.com/grpc/grpc-java.git
api: Discourage using ClientInterceptor for credentials
This commit is contained in:
parent
bd2f3c5b62
commit
257bb546fd
|
|
@ -24,10 +24,14 @@ import javax.annotation.concurrent.ThreadSafe;
|
||||||
* <p>Implementers use this mechanism to add cross-cutting behavior to {@link Channel} and
|
* <p>Implementers use this mechanism to add cross-cutting behavior to {@link Channel} and
|
||||||
* stub implementations. Common examples of such behavior include:
|
* stub implementations. Common examples of such behavior include:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Adding credentials to header metadata</li>
|
|
||||||
* <li>Logging and monitoring call behavior</li>
|
* <li>Logging and monitoring call behavior</li>
|
||||||
|
* <li>Adding metadata for proxies to observe</li>
|
||||||
* <li>Request and response rewriting</li>
|
* <li>Request and response rewriting</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
*
|
||||||
|
* <p>Providing authentication credentials is better served by {@link
|
||||||
|
* CallCredentials}. But a {@code ClientInterceptor} could set the {@code
|
||||||
|
* CallCredentials} within the {@link CallOptions}.
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public interface ClientInterceptor {
|
public interface ClientInterceptor {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue