QGrpcInterceptionContext Class
Provides contextual information to interceptor callbacks. More...
| Header: | #include <QGrpcInterceptor> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Grpc)target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
| Since: | Qt 6.11 |
- List of all members, including inherited members
- QGrpcInterceptionContext is part of Qt GRPC Interceptors.
Public Functions
| const QGrpcCallOptions & | callOptions() const & |
| const QAbstractGrpcChannel & | channel() const & |
| QtGrpc::RpcDescriptor | descriptor() const |
| quint64 | operationId() const |
| quint32 | version() const |
Detailed Description
QGrpcInterceptionContext is passed to interceptor callbacks and provides access to information about the intercepted RPC, such as the channel, the RPC descriptor, or call options.
A QGrpcInterceptionContext instance is created by Qt GRPC for each callback invocation. The context object is only valid for the duration of the callback and must not be stored.
Note: QGrpcInterceptionContext is not copyable or movable.
See also QGrpcStartInterceptor, QGrpcInitialMetadataInterceptor, QGrpcMessageReceivedInterceptor, QGrpcWriteMessageInterceptor, QGrpcWritesDoneInterceptor, QGrpcTrailingMetadataInterceptor, QGrpcFinishedInterceptor, and QGrpcCancelInterceptor.
Member Function Documentation
[noexcept] const QGrpcCallOptions &QGrpcInterceptionContext::callOptions() const &
Returns the call options that are in effect for the intercepted RPC.
[noexcept] const QAbstractGrpcChannel &QGrpcInterceptionContext::channel() const &
Returns the channel used for the intercepted RPC.
[noexcept] QtGrpc::RpcDescriptor QGrpcInterceptionContext::descriptor() const
Returns the descriptor identifying the intercepted RPC.
[noexcept] quint64 QGrpcInterceptionContext::operationId() const
Returns the unique identifier of the intercepted call.
Each ID is unique across all channels for the application lifetime.
This identifier can be used to correlate interception callbacks that belong to the same RPC operation across multiple hook points.
[noexcept] quint32 QGrpcInterceptionContext::version() const
Returns the version of the interception context.
Future versions of Qt may extend QGrpcInterceptionContext. This function can be used to identify the supported revision of the context.
© 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.