QGrpcClientInterceptor Class
Base class for Qt GRPC client interceptors. More...
Header: | #include <QGrpcClientInterceptor> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Grpc) target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
Since: | Qt 6.7 |
Status: | Technical Preview |
Public Functions
virtual | ~QGrpcClientInterceptor() |
void | intercept(std::shared_ptr<QGrpcChannelOperation> operation, typename QGrpcInterceptorContinuation<T>::ReplyType response, QGrpcInterceptorContinuation<T> &continuation) |
Protected Functions
virtual void | interceptBidirStream(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcBidirStream> response, QGrpcInterceptorContinuation<QGrpcBidirStream> &continuation) |
virtual void | interceptCall(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcCallReply> response, QGrpcInterceptorContinuation<QGrpcCallReply> &continuation) |
virtual void | interceptClientStream(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcClientStream> response, QGrpcInterceptorContinuation<QGrpcClientStream> &continuation) |
virtual void | interceptServerStream(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcServerStream> response, QGrpcInterceptorContinuation<QGrpcServerStream> &continuation) |
Detailed Description
The QGrpcClientInterceptor class provides a base for creating custom Qt GRPC client interceptors. It defines methods for intercepting different types of Qt GRPC calls and streams. Users can it to implement specific interception behavior.
See also Qt GRPC Client Interceptors.
Member Function Documentation
[virtual noexcept]
QGrpcClientInterceptor::~QGrpcClientInterceptor()
Default destructor of QGrpcClientInterceptor object.
template <typename T> void QGrpcClientInterceptor::intercept(std::shared_ptr<QGrpcChannelOperation> operation, typename QGrpcInterceptorContinuation<T>::ReplyType response, QGrpcInterceptorContinuation<T> &continuation)
Intercepts a Qt GRPC call or stream operation.
This method provides a generic interface for intercepting Qt GRPC operations based on the specified QGrpcOperation. It delegates to specialized methods for different types of Qt GRPC operations and passes operation, response, and continuation parameters to specialized method.
[virtual protected]
void QGrpcClientInterceptor::interceptBidirStream(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcBidirStream> response, QGrpcInterceptorContinuation<QGrpcBidirStream> &continuation)
Intercepts a Qt GRPC bidirectional streaming operation.
This method provides the default implementation of a virtual function. Users have the option to override this to offer specific functionality for QGrpcClientInterceptor.
The operation carries the values associated with the call. The response carries a preallocated QGrpcBidirStream of the stream response.
The continuation is a delegate that initiates the processing of the next interceptor or calls the underlying gRPC function. Implementations may call continuation zero or more times, depending on the desired outcome.
[virtual protected]
void QGrpcClientInterceptor::interceptCall(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcCallReply> response, QGrpcInterceptorContinuation<QGrpcCallReply> &continuation)
Intercepts a Qt GRPC call operation.
This method provides the default implementation of a virtual function. Users have the option to override this to offer specific functionality for QGrpcClientInterceptor.
The operation carries the values associated with the call. The response carries a preallocated QGrpcCallReply of the call response.
The continuation is a delegate that initiates the processing of the next interceptor or calls the underlying gRPC function. Implementations may call continuation zero or more times, depending on the desired outcome.
[virtual protected]
void QGrpcClientInterceptor::interceptClientStream(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcClientStream> response, QGrpcInterceptorContinuation<QGrpcClientStream> &continuation)
Intercepts a Qt GRPC client streaming operation.
This method provides the default implementation of a virtual function. Users have the option to override this to offer specific functionality for QGrpcClientInterceptor.
The operation carries the values associated with the call. The response carries a preallocated QGrpcClientStream of the stream response.
The continuation is a delegate that initiates the processing of the next interceptor or calls the underlying gRPC function. Implementations may call continuation zero or more times, depending on the desired outcome.
[virtual protected]
void QGrpcClientInterceptor::interceptServerStream(std::shared_ptr<QGrpcChannelOperation> operation, std::shared_ptr<QGrpcServerStream> response, QGrpcInterceptorContinuation<QGrpcServerStream> &continuation)
Intercepts a Qt GRPC server streaming operation.
This method provides the default implementation of a virtual function. Users have the option to override this to offer specific functionality for QGrpcClientInterceptor.
The operation carries the values associated with the call. The response carries a preallocated QGrpcServerStream of the stream response.
The continuation is a delegate that initiates the processing of the next interceptor or calls the underlying gRPC function. Implementations may call continuation zero or more times, depending on the desired outcome.
© 2024 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.