19 #ifndef GRPCPP_IMPL_CODEGEN_CLIENT_INTERCEPTOR_H 20 #define GRPCPP_IMPL_CODEGEN_CLIENT_INTERCEPTOR_H 34 class InterceptorBatchMethodsImpl;
37 namespace experimental {
52 namespace experimental {
64 const char*
method() {
return method_; }
71 : ctx_(ctx), method_(method), channel_(channel) {}
76 interceptors_[pos]->Intercept(interceptor_methods);
79 void RegisterInterceptors(
80 const std::vector<std::unique_ptr<
82 size_t interceptor_pos) {
83 if (interceptor_pos > creators.size()) {
87 for (
auto it = creators.begin() + interceptor_pos; it != creators.end();
89 interceptors_.push_back(std::unique_ptr<experimental::Interceptor>(
90 (*it)->CreateClientInterceptor(
this)));
93 interceptors_.push_back(std::unique_ptr<experimental::Interceptor>(
95 ->CreateClientInterceptor(
this)));
100 const char* method_ =
nullptr;
102 std::vector<std::unique_ptr<experimental::Interceptor>> interceptors_;
103 bool hijacked_ =
false;
104 size_t hijacked_interceptor_ = 0;
127 #endif // GRPCPP_IMPL_CODEGEN_CLIENT_INTERCEPTOR_H #define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:141
Definition: interceptor.h:69
~ClientRpcInfo()
Definition: client_interceptor.h:57
void RegisterGlobalClientInterceptorFactory(ClientInterceptorFactoryInterface *factory)
ChannelInterface * channel()
Definition: client_interceptor.h:65
virtual ~ClientInterceptorFactoryInterface()
Definition: client_interceptor.h:42
A ClientContext allows the person implementing a service client to:
Definition: client_context.h:165
Definition: client_interceptor.h:40
grpc::ClientContext * client_context()
Definition: client_interceptor.h:66
An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...
Definition: alarm.h:33
Definition: interceptor.h:123
Codegen interface for grpc::Channel.
Definition: channel_interface.h:60
Definition: interceptor_common.h:36
experimental::ClientInterceptorFactoryInterface * g_global_client_interceptor_factory
ClientRpcInfo()
Definition: client_interceptor.h:55
const char * method()
Definition: client_interceptor.h:64
Definition: client_interceptor.h:53