UpdateTokenInterceptor

public class UpdateTokenInterceptor
extends Object implements ClientInterceptor

java.lang.Object
com.android.tradefed.result.resultdb.UpdateTokenInterceptor


ResultDB 更新トークンを処理する gRPC クライアント インターセプタ。

現在の更新トークンを発信リクエストに添付し、特定の RPC の着信レスポンス ヘッダーから新しい更新トークン を抽出します。

概要

パブリック コンストラクタ

UpdateTokenInterceptor(Supplier<String> tokenSupplier, Consumer<String> tokenConsumer, String updateTokenRpc)

UpdateTokenInterceptor のコンストラクタ。

パブリック メソッド

<ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next)

パブリック コンストラクタ

UpdateTokenInterceptor

public UpdateTokenInterceptor (Supplier<String> tokenSupplier, 
                Consumer<String> tokenConsumer, 
                String updateTokenRpc)

UpdateTokenInterceptor のコンストラクタ。

パラメータ
tokenSupplier Supplier: 現在の更新トークンを取得するサプライヤ。

tokenConsumer Consumer: 新しい更新トークンを受信した場合に更新トークンを設定するコンシューマ。

updateTokenRpc String: ヘッダーで更新トークンを返す可能性がある RPC メソッド名のリスト。

パブリック メソッド

interceptCall

public ClientCall<ReqT, RespT> interceptCall (MethodDescriptor<ReqT, RespT> method, 
                CallOptions callOptions, 
                Channel next)

パラメータ
method MethodDescriptor

callOptions CallOptions

next Channel

戻り値
ClientCall<ReqT, RespT>