Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_CODEGEN_INTERCEPTOR_COMMON_H
20 #define GRPCPP_IMPL_CODEGEN_INTERCEPTOR_COMMON_H
44 static_cast<size_t>(
i) + 1)) {
45 hooks_[
static_cast<size_t>(
i)] =
false;
144 bool* fail_send_message,
153 std::multimap<std::string, std::string>*
metadata) {
165 std::multimap<std::string, std::string>*
metadata) {
186 if (info ==
nullptr) {
187 return std::unique_ptr<ChannelInterface>(
nullptr);
226 if (client_rpc_info !=
nullptr) {
231 return server_rpc_info ==
nullptr || server_rpc_info->
interceptors_.empty();
242 if (client_rpc_info !=
nullptr) {
243 if (client_rpc_info->interceptors_.empty()) {
252 if (server_rpc_info ==
nullptr || server_rpc_info->interceptors_.empty()) {
268 if (server_rpc_info ==
nullptr || server_rpc_info->interceptors_.empty()) {
282 if (rpc_info->hijacked_) {
303 if (rpc_info->hijacked_ && !
reverse_ &&
316 if (current_interceptor_index_ < rpc_info->interceptors_.size()) {
317 if (rpc_info->hijacked_ &&
345 if (current_interceptor_index_ < rpc_info->interceptors_.size()) {
368 static_cast<size_t>(
i) + 1)) {
369 hooks_[
static_cast<size_t>(
i)] =
false;
427 "It is illegal to call Hijack on a method which has a "
428 "Cancel notification");
433 "It is illegal to call GetSendMessage on a method which "
434 "has a Cancel notification");
441 "It is illegal to call GetSendMessageStatus on a method which "
442 "has a Cancel notification");
449 "It is illegal to call GetOriginalSendMessage on a method which "
450 "has a Cancel notification");
457 "It is illegal to call ModifySendMessage on a method which "
458 "has a Cancel notification");
463 "It is illegal to call GetSendInitialMetadata on a "
464 "method which has a Cancel notification");
470 "It is illegal to call GetSendStatus on a method which "
471 "has a Cancel notification");
477 "It is illegal to call ModifySendStatus on a method "
478 "which has a Cancel notification");
483 "It is illegal to call GetSendTrailingMetadata on a "
484 "method which has a Cancel notification");
490 "It is illegal to call GetRecvMessage on a method which "
491 "has a Cancel notification");
498 "It is illegal to call GetRecvInitialMetadata on a "
499 "method which has a Cancel notification");
505 "It is illegal to call GetRecvStatus on a method which "
506 "has a Cancel notification");
513 "It is illegal to call GetRecvTrailingMetadata on a "
514 "method which has a Cancel notification");
520 "It is illegal to call GetInterceptedChannel on a "
521 "method which has a Cancel notification");
522 return std::unique_ptr<ChannelInterface>(
nullptr);
527 "It is illegal to call FailHijackedRecvMessage on a "
528 "method which has a Cancel notification");
533 "It is illegal to call FailHijackedSendMessage on a "
534 "method which has a Cancel notification");
540 #endif // GRPCPP_IMPL_CODEGEN_INTERCEPTOR_COMMON_H
void SetSendTrailingMetadata(std::multimap< std::string, std::string > *metadata)
std::array< bool, static_cast< size_t > experimental::InterceptionHookPoints::NUM_INTERCEPTION_HOOKS)> hooks_
ByteBuffer * GetSerializedSendMessage() override
void SetRecvMessage(void *message, bool *hijacked_recv_message_failed)
std::multimap< std::string, std::string > * GetSendInitialMetadata() override
void ModifySendMessage(const void *message) override
const void * GetSendMessage() override
const void ** orig_send_message_
InterceptorBatchMethodsImpl()
void FailHijackedRecvMessage() override
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern array
MetadataMap * recv_initial_metadata_
std::vector< std::unique_ptr< experimental::Interceptor > > interceptors_
void FailHijackedSendMessage() override
std::unique_ptr< ChannelInterface > GetInterceptedChannel() override
void * GetRecvMessage() override
size_t current_interceptor_index_
ByteBuffer * send_message_
void AddInterceptionHookPoint(experimental::InterceptionHookPoints type)
bool GetSendMessageStatus() override
std::multimap< std::string, std::string > * send_initial_metadata_
void RunClientInterceptors()
Status * GetRecvStatus() override
bool GetSendMessageStatus() override
std::multimap< std::string, std::string > * GetSendTrailingMetadata() override
const void * GetSendMessage() override
void RunServerInterceptors()
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
CallOpSetInterface * ops_
void SetRecvInitialMetadata(MetadataMap *map)
std::multimap< std::string, std::string > * send_trailing_metadata_
bool * fail_send_message_
void SetRecvTrailingMetadata(MetadataMap *map)
experimental::ServerRpcInfo * server_rpc_info() const
bool QueryInterceptionHookPoint(experimental::InterceptionHookPoints type) override
MetadataMap * recv_trailing_metadata_
bool * hijacked_recv_message_failed_
bool RunInterceptors(std::function< void(void)> f)
void FailHijackedSendMessage() override
Status * GetRecvStatus() override
experimental::ClientRpcInfo * client_rpc_info() const
virtual void SetHijackingState()=0
std::multimap< grpc::string_ref, grpc::string_ref > * GetRecvInitialMetadata() override
bool QueryInterceptionHookPoint(experimental::InterceptionHookPoints type) override
Straightforward wrapping of the C call object.
void SetSendInitialMetadata(std::multimap< std::string, std::string > *metadata)
std::function< void(void)> callback_
~InterceptorBatchMethodsImpl() override
void SetRecvStatus(Status *status)
Status GetSendStatus() override
Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions.
std::string * error_message_
std::multimap< grpc::string_ref, grpc::string_ref > * GetRecvInitialMetadata() override
void * GetRecvMessage() override
bool InterceptorsListEmpty()
std::multimap< grpc::string_ref, grpc::string_ref > * GetRecvTrailingMetadata() override
void ModifySendMessage(const void *) override
GRPC_CUSTOM_UTIL_STATUS Status
Status GetSendStatus() override
Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions.
void SetSendStatus(grpc_status_code *code, std::string *error_details, std::string *error_message)
virtual void ContinueFinalizeResultAfterInterception()=0
void SetCallOpSetInterface(CallOpSetInterface *ops)
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
std::multimap< std::string, std::string > * GetSendInitialMetadata() override
void SetSendMessage(ByteBuffer *buf, const void **msg, bool *fail_send_message, std::function< Status(const void *)> serializer)
virtual void ContinueFillOpsAfterInterception()=0
std::multimap< grpc::string_ref, grpc::string_ref > * GetRecvTrailingMetadata() override
ByteBuffer * GetSerializedSendMessage() override
bool ran_hijacking_interceptor_
void ModifySendStatus(const Status &status) override
void ModifySendStatus(const Status &) override
std::function< Status(const void *)> serializer_
std::vector< std::unique_ptr< experimental::Interceptor > > interceptors_
std::string * error_details_
std::unique_ptr< ChannelInterface > GetInterceptedChannel() override
std::multimap< std::string, std::string > * GetSendTrailingMetadata() override
void FailHijackedRecvMessage() override
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:21