| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.17"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>GRPC C++: include/grpcpp/impl/intercepted_channel.h Source File</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td id="projectalign" style="padding-left: 0.5em;"> |
| <div id="projectname">GRPC C++ |
|  <span id="projectnumber">1.71.0</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.17 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */</script> |
| <div id="main-nav"></div> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_412f9a3d5dfcba8716486cd870ef4586.html">grpcpp</a></li><li class="navelem"><a class="el" href="dir_84040d6f573b73aa8d12512b533ede11.html">impl</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">intercepted_channel.h</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <a href="intercepted__channel_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// Copyright 2018 gRPC authors.</span></div> |
| <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div> |
| <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div> |
| <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// You may obtain a copy of the License at</span></div> |
| <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> |
| <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> |
| <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> |
| <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> |
| <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> |
| <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// limitations under the License.</span></div> |
| <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div> |
| <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#ifndef GRPCPP_IMPL_INTERCEPTED_CHANNEL_H</span></div> |
| <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#define GRPCPP_IMPL_INTERCEPTED_CHANNEL_H</span></div> |
| <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  </div> |
| <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2channel__interface_8h.html">grpcpp/impl/channel_interface.h</a>></span></div> |
| <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div> |
| <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">namespace </span><a class="code" href="namespacegrpc.html">grpc</a> {</div> |
| <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">class </span>CompletionQueue;</div> |
| <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div> |
| <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span>internal {</div> |
| <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div> |
| <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">class </span>InterceptorBatchMethodsImpl;</div> |
| <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div> |
| <div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classgrpc_1_1internal_1_1_intercepted_channel.html"> 35</a></span> <span class="keyword">class </span><a class="code" href="classgrpc_1_1internal_1_1_intercepted_channel.html">InterceptedChannel</a> : <span class="keyword">public</span> <a class="code" href="classgrpc_1_1_channel_interface.html">ChannelInterface</a> {</div> |
| <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">public</span>:</div> |
| <div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classgrpc_1_1internal_1_1_intercepted_channel.html#ac6c23faad6b1fe426e1092498790851e"> 37</a></span>  <a class="code" href="classgrpc_1_1internal_1_1_intercepted_channel.html#ac6c23faad6b1fe426e1092498790851e">~InterceptedChannel</a>()<span class="keyword"> override </span>{ channel_ = <span class="keyword">nullptr</span>; }</div> |
| <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div> |
| <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classgrpc_1_1internal_1_1_intercepted_channel.html#ab7073fa3f0de1369f7201c1ce1630970"> 41</a></span>  <a class="code" href="connectivity__state_8h.html#a065b65f5cdd062a67d82e2b6bcf68cf2">grpc_connectivity_state</a> <a class="code" href="classgrpc_1_1internal_1_1_intercepted_channel.html#ab7073fa3f0de1369f7201c1ce1630970">GetState</a>(<span class="keywordtype">bool</span> try_to_connect)<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> channel_-><a class="code" href="classgrpc_1_1_channel_interface.html#a68e987e7b87ca5a2668419736f9ee9b1">GetState</a>(try_to_connect);</div> |
| <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div> |
| <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div> |
| <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">private</span>:</div> |
| <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classgrpc_1_1internal_1_1_intercepted_channel.html">InterceptedChannel</a>(<a class="code" href="classgrpc_1_1_channel_interface.html">ChannelInterface</a>* channel, <span class="keywordtype">size_t</span> pos)</div> |
| <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  : channel_(channel), interceptor_pos_(pos) {}</div> |
| <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div> |
| <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  Call CreateCall(<span class="keyword">const</span> RpcMethod& method, <a class="code" href="classgrpc_1_1_client_context.html">grpc::ClientContext</a>* context,</div> |
| <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* cq)<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">return</span> channel_->CreateCallInternal(method, context, cq, interceptor_pos_);</div> |
| <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div> |
| <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div> |
| <div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordtype">void</span> PerformOpsOnCall(CallOpSetInterface* ops, Call* call)<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">return</span> channel_->PerformOpsOnCall(ops, call);</div> |
| <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  }</div> |
| <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordtype">void</span>* RegisterMethod(<span class="keyword">const</span> <span class="keywordtype">char</span>* method)<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordflow">return</span> channel_->RegisterMethod(method);</div> |
| <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  }</div> |
| <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div> |
| <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordtype">void</span> NotifyOnStateChangeImpl(<a class="code" href="connectivity__state_8h.html#a065b65f5cdd062a67d82e2b6bcf68cf2">grpc_connectivity_state</a> last_observed,</div> |
| <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline, <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* cq,</div> |
| <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">void</span>* tag)<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">return</span> channel_->NotifyOnStateChangeImpl(last_observed, deadline, cq, tag);</div> |
| <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div> |
| <div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordtype">bool</span> WaitForStateChangeImpl(<a class="code" href="connectivity__state_8h.html#a065b65f5cdd062a67d82e2b6bcf68cf2">grpc_connectivity_state</a> last_observed,</div> |
| <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline)<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> channel_->WaitForStateChangeImpl(last_observed, deadline);</div> |
| <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div> |
| <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div> |
| <div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* CallbackCQ()<span class="keyword"> override </span>{</div> |
| <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> channel_->CallbackCQ();</div> |
| <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div> |
| <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  </div> |
| <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  ChannelInterface* channel_;</div> |
| <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">size_t</span> interceptor_pos_;</div> |
| <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div> |
| <div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classgrpc_1_1internal_1_1_intercepted_channel.html#a727024a430a919fd5294f685d1c5b36c"> 78</a></span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classgrpc_1_1internal_1_1_interceptor_batch_methods_impl.html">InterceptorBatchMethodsImpl</a>;</div> |
| <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> };</div> |
| <div class="line"><a name="l00080"></a><span class="lineno"> 80</span> } <span class="comment">// namespace internal</span></div> |
| <div class="line"><a name="l00081"></a><span class="lineno"> 81</span> } <span class="comment">// namespace grpc</span></div> |
| <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  </div> |
| <div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor">#endif // GRPCPP_IMPL_INTERCEPTED_CHANNEL_H</span></div> |
| </div><!-- fragment --></div><!-- contents --> |
| <div class="ttc" id="aclassgrpc_1_1internal_1_1_intercepted_channel_html_ab7073fa3f0de1369f7201c1ce1630970"><div class="ttname"><a href="classgrpc_1_1internal_1_1_intercepted_channel.html#ab7073fa3f0de1369f7201c1ce1630970">grpc::internal::InterceptedChannel::GetState</a></div><div class="ttdeci">grpc_connectivity_state GetState(bool try_to_connect) override</div><div class="ttdoc">Get the current channel state.</div><div class="ttdef"><b>Definition:</b> intercepted_channel.h:41</div></div> |
| <div class="ttc" id="anamespacegrpc_html"><div class="ttname"><a href="namespacegrpc.html">grpc</a></div><div class="ttdoc">An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...</div><div class="ttdef"><b>Definition:</b> alarm.h:33</div></div> |
| <div class="ttc" id="aclassgrpc_1_1_client_context_html"><div class="ttname"><a href="classgrpc_1_1_client_context.html">grpc::ClientContext</a></div><div class="ttdoc">A ClientContext allows the person implementing a service client to:</div><div class="ttdef"><b>Definition:</b> client_context.h:194</div></div> |
| <div class="ttc" id="aconnectivity__state_8h_html_a065b65f5cdd062a67d82e2b6bcf68cf2"><div class="ttname"><a href="connectivity__state_8h.html#a065b65f5cdd062a67d82e2b6bcf68cf2">grpc_connectivity_state</a></div><div class="ttdeci">grpc_connectivity_state</div><div class="ttdoc">Connectivity state of a channel.</div><div class="ttdef"><b>Definition:</b> connectivity_state.h:30</div></div> |
| <div class="ttc" id="agrpcpp_2impl_2channel__interface_8h_html"><div class="ttname"><a href="grpcpp_2impl_2channel__interface_8h.html">channel_interface.h</a></div></div> |
| <div class="ttc" id="aclassgrpc_1_1_channel_interface_html"><div class="ttname"><a href="classgrpc_1_1_channel_interface.html">grpc::ChannelInterface</a></div><div class="ttdoc">Codegen interface for grpc::Channel.</div><div class="ttdef"><b>Definition:</b> channel_interface.h:71</div></div> |
| <div class="ttc" id="aclassgrpc_1_1internal_1_1_intercepted_channel_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_intercepted_channel.html">grpc::internal::InterceptedChannel</a></div><div class="ttdoc">An InterceptedChannel is available to client Interceptors.</div><div class="ttdef"><b>Definition:</b> intercepted_channel.h:35</div></div> |
| <div class="ttc" id="aclassgrpc_1_1_channel_interface_html_a68e987e7b87ca5a2668419736f9ee9b1"><div class="ttname"><a href="classgrpc_1_1_channel_interface.html#a68e987e7b87ca5a2668419736f9ee9b1">grpc::ChannelInterface::GetState</a></div><div class="ttdeci">virtual grpc_connectivity_state GetState(bool try_to_connect)=0</div><div class="ttdoc">Get the current channel state.</div></div> |
| <div class="ttc" id="aclassgrpc_1_1internal_1_1_intercepted_channel_html_ac6c23faad6b1fe426e1092498790851e"><div class="ttname"><a href="classgrpc_1_1internal_1_1_intercepted_channel.html#ac6c23faad6b1fe426e1092498790851e">grpc::internal::InterceptedChannel::~InterceptedChannel</a></div><div class="ttdeci">~InterceptedChannel() override</div><div class="ttdef"><b>Definition:</b> intercepted_channel.h:37</div></div> |
| <div class="ttc" id="aclassgrpc_1_1_completion_queue_html"><div class="ttname"><a href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a></div><div class="ttdoc">A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue....</div><div class="ttdef"><b>Definition:</b> completion_queue.h:104</div></div> |
| <div class="ttc" id="astructgpr__timespec_html"><div class="ttname"><a href="structgpr__timespec.html">gpr_timespec</a></div><div class="ttdoc">Analogous to struct timespec.</div><div class="ttdef"><b>Definition:</b> time.h:47</div></div> |
| <div class="ttc" id="aclassgrpc_1_1internal_1_1_interceptor_batch_methods_impl_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_interceptor_batch_methods_impl.html">grpc::internal::InterceptorBatchMethodsImpl</a></div><div class="ttdef"><b>Definition:</b> interceptor_common.h:37</div></div> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated on Thu Mar 13 2025 18:13:55 for GRPC C++ by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.17 |
| </small></address> |
| </body> |
| </html> |