Auf dieser Seite

QGrpcInterceptionContext Class

Stellt Kontextinformationen für Interceptor-Callbacks bereit. Mehr...

Header: #include <QGrpcInterceptor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Seit: Qt 6.11

Öffentliche Funktionen

QGrpcInterceptionContext(const QGrpcInterceptionContext &)
QGrpcInterceptionContext(QGrpcInterceptionContext &&)
~QGrpcInterceptionContext()
const QGrpcCallOptions &callOptions() const &
const QAbstractGrpcChannel &channel() const &
QtGrpc::RpcDescriptor descriptor() const
quint64 operationId() const
quint32 version() const
QGrpcInterceptionContext &operator=(QGrpcInterceptionContext &&)
QGrpcInterceptionContext &operator=(const QGrpcInterceptionContext &)

Ausführliche Beschreibung

QGrpcInterceptionContext wird an Interceptor-Callbacks übergeben und bietet Zugriff auf Informationen zum abgefangenen RPC, wie z. B. den Kanal, den RPC-Deskriptor oder Aufrufoptionen.

Eine QGrpcInterceptionContext-Instanz wird von „ Qt GRPC “ für jeden Callback-Aufruf erstellt. Das Kontext-Objekt ist nur für die Dauer des Callbacks gültig und darf nicht gespeichert werden.

Hinweis: QGrpcInterceptionContext kann weder kopiert noch verschoben werden.

Siehe auch QGrpcStartInterceptor, QGrpcInitialMetadataInterceptor, QGrpcMessageReceivedInterceptor, QGrpcWriteMessageInterceptor, QGrpcWritesDoneInterceptor, QGrpcTrailingMetadataInterceptor, QGrpcFinishedInterceptor und QGrpcCancelInterceptor.

Dokumentation zu den Member-Funktionen

[delete] QGrpcInterceptionContext::QGrpcInterceptionContext(const QGrpcInterceptionContext &)

Erstellt eine Instanz von „ QGrpcInterceptionContext “ durch Kopieren. Diese Funktion wurde gelöscht.

[delete] QGrpcInterceptionContext::QGrpcInterceptionContext(QGrpcInterceptionContext &&)

Erstellt eine Instanz von ` QGrpcInterceptionContext`. Diese Funktion wurde gelöscht.

[constexpr noexcept default] QGrpcInterceptionContext::~QGrpcInterceptionContext()

Löscht die Instanz von „ QGrpcInterceptionContext “.

[noexcept] const QGrpcCallOptions &QGrpcInterceptionContext::callOptions() const &

Gibt die für den abgefangenen RPC geltenden Aufrufoptionen zurück.

[noexcept] const QAbstractGrpcChannel &QGrpcInterceptionContext::channel() const &

Gibt den Kanal zurück, der für den abgefangenen RPC verwendet wurde.

[noexcept] QtGrpc::RpcDescriptor QGrpcInterceptionContext::descriptor() const

Gibt den Deskriptor zurück, der den abgefangenen RPC identifiziert.

[noexcept] quint64 QGrpcInterceptionContext::operationId() const

Gibt die eindeutige Kennung des abgefangenen Anrufs zurück.

Jede ID ist über alle Kanäle hinweg für die gesamte Lebensdauer der Anwendung eindeutig.

Diese Kennung kann verwendet werden, um Abhör-Callbacks, die zur selben RPC-Operation gehören, über mehrere Hook-Punkte hinweg miteinander zu verknüpfen.

[noexcept] quint32 QGrpcInterceptionContext::version() const

Gibt die Version des Interception-Kontexts zurück.

Zukünftige Versionen von Qt könnten die Funktion ` QGrpcInterceptionContext` erweitern. Mit dieser Funktion lässt sich die unterstützte Revision des Kontexts ermitteln.

[delete] QGrpcInterceptionContext &QGrpcInterceptionContext::operator=(QGrpcInterceptionContext &&)

other Weist dieser „ QGrpcInterceptionContext “-Instanz „ “ zu. Diese Funktion wird gelöscht.

[delete] QGrpcInterceptionContext &QGrpcInterceptionContext::operator=(const QGrpcInterceptionContext &)

other Weist dieser „ QGrpcInterceptionContext “-Instanz „ “ per Kopierzuweisung zu. Diese Funktion wird gelöscht.

© 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.