QGrpcTrailingMetadataInterceptor Class
RPC의 후행 메타데이터를 가로챈다. 더 보기...
| 헤더: | #include <QGrpcInterceptor> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Grpc) target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
| 다음부터: | Qt 6.11 |
- 상속된 멤버를 포함한 모든 멤버 목록
- QGrpcTrailingMetadataInterceptor는 Qt GRPC 인터셉터의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입 가능합니다.
공개 함수
| virtual | ~QGrpcTrailingMetadataInterceptor() |
| virtual void | onTrailingMetadata(QGrpcInterceptionContext &context, QMultiHash<QByteArray, QByteArray> &metadata) = 0 |
상세 설명
QGrpcTrailingMetadataInterceptor를 구현하여 RPC와 관련된 후행 메타데이터를 관찰하거나 수정할 수 있습니다.
후행 메타데이터는 모든 응답 메시지가 전달된 후, RPC가 완료될 때 서버에서 전송됩니다.
인터셉션 메커니즘과 인터셉터 인터페이스가 RPC의 수명 주기에 어떻게 관여하는지에 대한 소개는 Qt GRPC 의 인터셉터 개요를 참조하십시오.
참고: 이 인터셉터는 아웃바운드 방향으로 작동합니다. 여러 인터셉터 콜백이 체인을 통해 흐르는 방식에 대한 자세한 내용은 ‘방향 및 흐름’ 섹션을 참조하십시오.
또한 QtGrpc::InterceptorCapability::TrailingMetadata, QGrpcOperation::serverTrailingMetadata() 및 QGrpcInterceptionContext 을참조하십시오 .
멤버 함수 문서
[virtual noexcept] QGrpcTrailingMetadataInterceptor::~QGrpcTrailingMetadataInterceptor()
요격기를 파괴한다.
[pure virtual] void QGrpcTrailingMetadataInterceptor::onTrailingMetadata(QGrpcInterceptionContext &context, QMultiHash<QByteArray, QByteArray> &metadata)
RPC에 대한 후행 metadata 가 사용 가능해지면 호출됩니다.
context 는 가로채진 RPC에 대한 정보를 제공합니다. metadata 는 RPC로 전달되기 전에 그 자리에서 수정될 수 있습니다.
QGrpcOperation::serverTrailingMetadata()도 참조하십시오 .
© 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.