intercepted_channel.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPCPP_IMPL_CODEGEN_INTERCEPTED_CHANNEL_H
20 #define GRPCPP_IMPL_CODEGEN_INTERCEPTED_CHANNEL_H
21 
22 // IWYU pragma: private
23 
25 
26 namespace grpc {
27 class CompletionQueue;
28 
29 namespace internal {
30 
31 class InterceptorBatchMethodsImpl;
32 
38  public:
39  ~InterceptedChannel() override { channel_ = nullptr; }
40 
45  }
46 
47  private:
50 
52  grpc::CompletionQueue* cq) override {
54  }
55 
58  }
59  void* RegisterMethod(const char* method) override {
61  }
62 
65  void* tag) override {
66  return channel_->NotifyOnStateChangeImpl(last_observed, deadline, cq, tag);
67  }
69  gpr_timespec deadline) override {
70  return channel_->WaitForStateChangeImpl(last_observed, deadline);
71  }
72 
74  return channel_->CallbackCQ();
75  }
76 
79 
81 };
82 } // namespace internal
83 } // namespace grpc
84 
85 #endif // GRPCPP_IMPL_CODEGEN_INTERCEPTED_CHANNEL_H
grpc::ChannelInterface::CallbackCQ
virtual grpc::CompletionQueue * CallbackCQ()
Definition: grpcpp/impl/codegen/channel_interface.h:168
pos
int pos
Definition: libuv/docs/code/tty-gravity/main.c:11
grpc::internal::InterceptedChannel::CallbackCQ
grpc::CompletionQueue * CallbackCQ() override
Definition: intercepted_channel.h:73
grpc
Definition: grpcpp/alarm.h:33
grpc::internal::InterceptedChannel
Definition: intercepted_channel.h:37
grpc::internal::CallOpSetInterface
Definition: call_op_set_interface.h:36
grpc::internal::InterceptorBatchMethodsImpl
Definition: interceptor_common.h:37
grpc::ChannelInterface::CreateCallInternal
virtual internal::Call CreateCallInternal(const internal::RpcMethod &, grpc::ClientContext *, grpc::CompletionQueue *, size_t)
Definition: grpcpp/impl/codegen/channel_interface.h:155
grpc::internal::InterceptedChannel::PerformOpsOnCall
void PerformOpsOnCall(CallOpSetInterface *ops, Call *call) override
Definition: intercepted_channel.h:56
grpc::internal::InterceptedChannel::CreateCall
Call CreateCall(const RpcMethod &method, grpc::ClientContext *context, grpc::CompletionQueue *cq) override
Definition: intercepted_channel.h:51
grpc_connectivity_state
grpc_connectivity_state
Definition: include/grpc/impl/codegen/connectivity_state.h:30
call
FilterStackCall * call
Definition: call.cc:750
grpc::ChannelInterface::NotifyOnStateChangeImpl
virtual void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed, gpr_timespec deadline, grpc::CompletionQueue *cq, void *tag)=0
grpc::ChannelInterface
Codegen interface for grpc::Channel.
Definition: grpcpp/impl/codegen/channel_interface.h:73
grpc::internal::InterceptedChannel::channel_
ChannelInterface * channel_
Definition: intercepted_channel.h:77
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
grpc::internal::RpcMethod
Descriptor of an RPC method.
Definition: grpcpp/impl/codegen/rpc_method.h:31
tag
static void * tag(intptr_t t)
Definition: bad_client.cc:318
grpc::ChannelInterface::WaitForStateChangeImpl
virtual bool WaitForStateChangeImpl(grpc_connectivity_state last_observed, gpr_timespec deadline)=0
grpc::internal::InterceptedChannel::interceptor_pos_
size_t interceptor_pos_
Definition: intercepted_channel.h:78
grpc::internal::InterceptedChannel::InterceptedChannel
InterceptedChannel(ChannelInterface *channel, size_t pos)
Definition: intercepted_channel.h:48
grpc::ChannelInterface::RegisterMethod
virtual void * RegisterMethod(const char *method)=0
grpc::internal::InterceptedChannel::WaitForStateChangeImpl
bool WaitForStateChangeImpl(grpc_connectivity_state last_observed, gpr_timespec deadline) override
Definition: intercepted_channel.h:68
grpc::internal::Call
Straightforward wrapping of the C call object.
Definition: include/grpcpp/impl/codegen/call.h:37
grpc::ClientContext
Definition: grpcpp/impl/codegen/client_context.h:195
grpc::internal::InterceptedChannel::RegisterMethod
void * RegisterMethod(const char *method) override
Definition: intercepted_channel.h:59
channel_interface.h
internal
Definition: benchmark/test/output_test_helper.cc:20
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
grpc::internal::InterceptedChannel::GetState
grpc_connectivity_state GetState(bool try_to_connect) override
Definition: intercepted_channel.h:43
grpc::internal::InterceptedChannel::NotifyOnStateChangeImpl
void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed, gpr_timespec deadline, grpc::CompletionQueue *cq, void *tag) override
Definition: intercepted_channel.h:63
grpc::CompletionQueue
Definition: include/grpcpp/impl/codegen/completion_queue.h:104
gpr_timespec
Definition: gpr_types.h:50
tests.unit._exit_scenarios.try_to_connect
try_to_connect
Definition: _exit_scenarios.py:189
grpc::internal::InterceptedChannel::~InterceptedChannel
~InterceptedChannel() override
Definition: intercepted_channel.h:39
grpc::ChannelInterface::GetState
virtual grpc_connectivity_state GetState(bool try_to_connect)=0
method
NSString * method
Definition: ProtoMethod.h:28
ops
static grpc_op ops[6]
Definition: test/core/fling/client.cc:39
grpc::ChannelInterface::PerformOpsOnCall
virtual void PerformOpsOnCall(internal::CallOpSetInterface *ops, internal::Call *call)=0
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:21