このページでは

<QGrpcInterceptor> - Interceptor types

<QGrpcInterceptor> ヘッダーファイルには、基本的なインターセプタ型が定義されています。詳細...

Header: #include <QGrpcInterceptor>
Since: Qt 6.11

型

(since 6.11) flags InterceptorCapabilities
(since 6.11) enum class InterceptorCapability { Start, InitialMetadata, MessageReceived, WriteMessage, WritesDone, …, Cancel }

詳細な説明

Qt GRPC <QtGrpcInterceptor> ヘッダーファイルに一般的にまとめられているさまざまな型を提供します。

インターセプトの仕組みや、インターセプタインターフェースが RPC のライフサイクルにどのように関与するかについての概要については、「Qt GRPC インターセプタの概要」を参照してください。

Qt GRPC RPCライフサイクルにおけるフックポイントとして、以下のインターセプタインターフェースを提供します:

インターフェースフックポイント方向変更可能
QGrpcStartInterceptorRPCの開始前アウトバウンド初期メッセージオブジェクト、呼び出しオプション
QGrpcWriteMessageInterceptor送信メッセージが書き込まれる前送信メッセージオブジェクト
QGrpcWritesDoneInterceptorクライアントが書き込み完了を通知したとき送信—
QGrpcCancelInterceptorRPCがキャンセルされたとき送信—
QGrpcInitialMetadataInterceptor初期メタデータを受信したとき受信時メタデータ
QGrpcMessageReceivedInterceptorメッセージのペイロードを受信したとき受信シリアライズされたメッセージデータ
QGrpcTrailingMetadataInterceptor末尾のメタデータを受信したとき受信時メタデータ
QGrpcFinishedInterceptorRPCが完了したとき受信最終ステータス

インターセプタ機構

以下のクラスおよびページが、Qt GRPC のインターセプタ機構を構成しています:

タイプのドキュメント

[since 6.11] enum class InterceptorCapability
[since 6.11] flags InterceptorCapabilities

インターセプタがサポートするインターセプト・フックポイントを指定します。

Qt GRPC InterceptorCapability の値を使用して、インターセプタが提供するインターセプトフックポイントを記述します。

1つのインターセプタクラスは、複数のインターセプタインターフェース(たとえば、QGrpcStartInterceptor やQGrpcFinishedInterceptor など)を実装することができ、したがって複数の機能に対応することができます。

定数値説明
InterceptorCapability::Start0x01インターセプタは `QGrpcStartInterceptor` を実装します。
InterceptorCapability::InitialMetadata0x02インターセプタは `QGrpcInitialMetadataInterceptor` を実装しています。インターセプタは ` ` を実装しています。
InterceptorCapability::MessageReceived0x04このインターセプタは、QGrpcMessageReceivedInterceptor を実装しています。このインターセプタは、 を実装しています。
InterceptorCapability::WriteMessage0x08このインターセプタは、QGrpcWriteMessageInterceptor を実装しています。
InterceptorCapability::WritesDone0x10このインターセプタは、QGrpcWritesDoneInterceptor を実装しています。
InterceptorCapability::TrailingMetadata0x20このインターセプタは、QGrpcTrailingMetadataInterceptor を実装しています。
InterceptorCapability::Finished0x40このインターセプタは、QGrpcFinishedInterceptor を実装しています。
InterceptorCapability::Cancel0x80このインターセプターは `QGrpcCancelInterceptor` を実装しています。

この列挙型は Qt 6.11 で導入されました。

InterceptorCapabilities 型は、QFlags<InterceptorCapability> の typedef です。これは、InterceptorCapability 値の OR 組み合わせを格納します。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.