The QAbstractGrpcChannel class is interface that represents common gRPC channel functionality. More...
#include <qabstractgrpcchannel.h>
Public Member Functions | |
virtual QGrpcStatus | call (const QString &method, const QString &service, const QByteArray &args, QByteArray &ret)=0 |
Calls method synchronously with given serialized message args and write result of call to ret . More... | |
virtual void | call (const QString &method, const QString &service, const QByteArray &args, QtProtobuf::QGrpcAsyncReply *ret)=0 |
Calls method asynchronously with given serialized messge args . More... | |
virtual void | subscribe (QGrpcSubscription *subscription, const QString &service, QAbstractGrpcClient *client)=0 |
Subscribes to server-side stream to receive updates for given method . More... | |
virtual std::shared_ptr< QAbstractProtobufSerializer > | serializer () const =0 |
const QThread * | thread () const |
Friends | |
class | QGrpcAsyncReply |
class | QGrpcSubscription |
The QAbstractGrpcChannel class is interface that represents common gRPC channel functionality.
You may implement this interface to create own channels for gRPC transport.
|
pure virtual |
Calls method
synchronously with given serialized message args
and write result of call to ret
.
[in] | method | remote method is called |
[in] | service | service identified in URL path format |
[in] | args | serialized argument message |
[out] | ret | output bytearray to collect returned message |
Implemented in QtProtobuf::QGrpcHttp2Channel, and QtProtobuf::QGrpcChannel.
|
pure virtual |
Calls method
asynchronously with given serialized messge args
.
Result of method call is written to QGrpcAsyncReply.
[in] | method | remote method is called |
[in] | service | service identified in URL path format |
[in] | args | serialized argument message |
[out] | ret | QGrpcAsyncReply that will be returned to end-point user to read data once call complete. QGrpcAsyncReply lifecycle is managed by QAbstractGrpcClient only. |
Implemented in QtProtobuf::QGrpcHttp2Channel, and QtProtobuf::QGrpcChannel.
|
pure virtual |
Subscribes to server-side stream to receive updates for given method
.
[in] | method | remote method is called |
[in] | service | service identified in URL path format |
[in] | args | serialized argument message |
[in] | handler | callback that will be called when message recevied from the server-stream |
Implemented in QtProtobuf::QGrpcHttp2Channel, and QtProtobuf::QGrpcChannel.