module-src_client_interceptors.html 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Documentation Module: src/client_interceptors</title>
  7. <!--[if lt IE 9]>
  8. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  9. <![endif]-->
  10. <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
  11. <link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
  12. </head>
  13. <body>
  14. <div class="navbar navbar-default navbar-fixed-top ">
  15. <div class="container">
  16. <div class="navbar-header">
  17. <a class="navbar-brand" href="index.html">Documentation</a>
  18. <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
  19. <span class="icon-bar"></span>
  20. <span class="icon-bar"></span>
  21. <span class="icon-bar"></span>
  22. </button>
  23. </div>
  24. <div class="navbar-collapse collapse" id="topNavigation">
  25. <ul class="nav navbar-nav">
  26. <li class="dropdown">
  27. <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
  28. <ul class="dropdown-menu ">
  29. <li><a href="grpc.html">grpc</a></li><li><a href="grpc.credentials.html">grpc.credentials</a></li>
  30. </ul>
  31. </li>
  32. <li class="dropdown">
  33. <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
  34. <ul class="dropdown-menu ">
  35. <li><a href="module-src_client_interceptors.html">src/client_interceptors</a></li>
  36. </ul>
  37. </li>
  38. <li class="dropdown">
  39. <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
  40. <ul class="dropdown-menu ">
  41. <li><a href="grpc.Channel.html">grpc.Channel</a></li><li><a href="grpc.Client.html">grpc.Client</a></li><li><a href="grpc.credentials-CallCredentials.html">grpc.credentials~CallCredentials</a></li><li><a href="grpc.credentials-ChannelCredentials.html">grpc.credentials~ChannelCredentials</a></li><li><a href="grpc.Metadata.html">grpc.Metadata</a></li><li><a href="grpc.Server.html">grpc.Server</a></li><li><a href="grpc.ServerCredentials.html">grpc.ServerCredentials</a></li><li><a href="grpc-Call.html">grpc~Call</a></li><li><a href="grpc-ClientDuplexStream.html">grpc~ClientDuplexStream</a></li><li><a href="grpc-ClientReadableStream.html">grpc~ClientReadableStream</a></li><li><a href="grpc-ClientUnaryCall.html">grpc~ClientUnaryCall</a></li><li><a href="grpc-ClientWritableStream.html">grpc~ClientWritableStream</a></li><li><a href="grpc-ServerDuplexStream.html">grpc~ServerDuplexStream</a></li><li><a href="grpc-ServerReadableStream.html">grpc~ServerReadableStream</a></li><li><a href="grpc-ServerUnaryCall.html">grpc~ServerUnaryCall</a></li><li><a href="grpc-ServerWritableStream.html">grpc~ServerWritableStream</a></li><li><a href="module-src_client_interceptors-EndListener.html">src/client_interceptors~EndListener</a></li><li><a href="module-src_client_interceptors-InterceptingCall.html">src/client_interceptors~InterceptingCall</a></li><li><a href="module-src_client_interceptors-InterceptingListener.html">src/client_interceptors~InterceptingListener</a></li><li><a href="module-src_client_interceptors-InterceptorConfigurationError.html">src/client_interceptors~InterceptorConfigurationError</a></li><li><a href="module-src_client_interceptors-ListenerBuilder.html">src/client_interceptors~ListenerBuilder</a></li><li><a href="module-src_client_interceptors-RequesterBuilder.html">src/client_interceptors~RequesterBuilder</a></li><li><a href="module-src_client_interceptors-StatusBuilder.html">src/client_interceptors~StatusBuilder</a></li>
  42. </ul>
  43. </li>
  44. <li class="dropdown">
  45. <a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
  46. <ul class="dropdown-menu ">
  47. <li><a href="grpc-ClientDuplexStream.html#event:metadata">grpc~ClientDuplexStream#metadata</a></li><li><a href="grpc-ClientDuplexStream.html#event:status">grpc~ClientDuplexStream#status</a></li><li><a href="grpc-ClientReadableStream.html#event:metadata">grpc~ClientReadableStream#metadata</a></li><li><a href="grpc-ClientReadableStream.html#event:status">grpc~ClientReadableStream#status</a></li><li><a href="grpc-ClientUnaryCall.html#event:metadata">grpc~ClientUnaryCall#event:metadata</a></li><li><a href="grpc-ClientUnaryCall.html#event:status">grpc~ClientUnaryCall#event:status</a></li><li><a href="grpc-ClientWritableStream.html#event:metadata">grpc~ClientWritableStream#metadata</a></li><li><a href="grpc-ClientWritableStream.html#event:status">grpc~ClientWritableStream#status</a></li><li><a href="grpc-ServerDuplexStream.html#~event:cancelled">grpc~ServerDuplexStream~event:cancelled</a></li><li><a href="grpc-ServerReadableStream.html#~event:cancelled">grpc~ServerReadableStream~event:cancelled</a></li><li><a href="grpc-ServerUnaryCall.html#~event:cancelled">grpc~ServerUnaryCall~event:cancelled</a></li><li><a href="grpc-ServerWritableStream.html#~event:cancelled">grpc~ServerWritableStream~event:cancelled</a></li>
  48. </ul>
  49. </li>
  50. <li class="dropdown">
  51. <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
  52. <ul class="dropdown-menu ">
  53. <li><a href="global.html#CancelRequester">CancelRequester</a></li><li><a href="global.html#CloseRequester">CloseRequester</a></li><li><a href="global.html#createStatusError">createStatusError</a></li><li><a href="global.html#getClientInterceptors">getClientInterceptors</a></li><li><a href="global.html#getMethodType">getMethodType</a></li><li><a href="global.html#GetPeerRequester">GetPeerRequester</a></li><li><a href="global.html#Interceptor">Interceptor</a></li><li><a href="global.html#InterceptorProvider">InterceptorProvider</a></li><li><a href="global.html#loadPackageDefinition">loadPackageDefinition</a></li><li><a href="global.html#MessageListener">MessageListener</a></li><li><a href="global.html#MessageRequester">MessageRequester</a></li><li><a href="global.html#MetadataListener">MetadataListener</a></li><li><a href="global.html#MetadataRequester">MetadataRequester</a></li><li><a href="global.html#NextCall">NextCall</a></li><li><a href="global.html#StatusListener">StatusListener</a></li>
  54. </ul>
  55. </li>
  56. <li class="dropdown">
  57. <a href="externals.list.html" class="dropdown-toggle" data-toggle="dropdown">Externals<b class="caret"></b></a>
  58. <ul class="dropdown-menu ">
  59. <li><a href="external-Duplex.html">Duplex</a></li><li><a href="external-EventEmitter.html">EventEmitter</a></li><li><a href="external-GoogleCredential.html">GoogleCredential</a></li><li><a href="external-Readable.html">Readable</a></li><li><a href="external-Writable.html">Writable</a></li>
  60. </ul>
  61. </li>
  62. </ul>
  63. <div class="col-sm-3 col-md-3">
  64. <form class="navbar-form" role="search">
  65. <div class="input-group">
  66. <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
  67. <div class="input-group-btn">
  68. <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
  69. </div>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="container" id="toc-content">
  77. <div class="row">
  78. <div class="col-md-8">
  79. <div id="main">
  80. <h1 class="page-title">Module: src/client_interceptors</h1>
  81. <section>
  82. <header>
  83. </header>
  84. <article>
  85. <div class="container-overview">
  86. <div class="description"><p>Client Interceptors</p>
  87. <p>This module describes the interceptor framework for clients.
  88. An interceptor is a function which takes an options object and a nextCall
  89. function and returns an InterceptingCall:</p>
  90. <pre class="prettyprint source"><code>var interceptor = function(options, nextCall) {
  91. return new InterceptingCall(nextCall(options));
  92. }</code></pre><p>The interceptor function must return an InterceptingCall object. Returning
  93. <code>new InterceptingCall(nextCall(options))</code> will satisfy the contract (but
  94. provide no interceptor functionality). <code>nextCall</code> is a function which will
  95. generate the next interceptor in the chain.</p>
  96. <p>To implement interceptor functionality, create a requester and pass it to
  97. the InterceptingCall constructor:</p>
  98. <p><code>return new InterceptingCall(nextCall(options), requester);</code></p>
  99. <p>A requester is a POJO with zero or more of the following methods:</p>
  100. <p><code>start(metadata, listener, next)</code></p>
  101. <ul>
  102. <li>To continue, call next(metadata, listener). Listeners are described</li>
  103. <li>below.</li>
  104. </ul>
  105. <p><code>sendMessage(message, next)</code></p>
  106. <ul>
  107. <li>To continue, call next(message).</li>
  108. </ul>
  109. <p><code>halfClose(next)</code></p>
  110. <ul>
  111. <li>To continue, call next().</li>
  112. </ul>
  113. <p><code>cancel(message, next)</code></p>
  114. <ul>
  115. <li>To continue, call next().</li>
  116. </ul>
  117. <p>A listener is a POJO with one or more of the following methods:</p>
  118. <p><code>onReceiveMetadata(metadata, next)</code></p>
  119. <ul>
  120. <li>To continue, call next(metadata)</li>
  121. </ul>
  122. <p><code>onReceiveMessage(message, next)</code></p>
  123. <ul>
  124. <li>To continue, call next(message)</li>
  125. </ul>
  126. <p><code>onReceiveStatus(status, next)</code></p>
  127. <ul>
  128. <li>To continue, call next(status)</li>
  129. </ul>
  130. <p>A listener is provided by the requester's <code>start</code> method. The provided
  131. listener implements all the inbound interceptor methods, which can be called
  132. to short-circuit the gRPC call.</p>
  133. <p>Three usage patterns are supported for listeners:
  134. 1) Pass the listener along without modification: <code>next(metadata, listener)</code>.
  135. In this case the interceptor declines to intercept any inbound operations.
  136. 2) Create a new listener with one or more inbound interceptor methods and
  137. pass it to <code>next</code>. In this case the interceptor will fire on the inbound
  138. operations implemented in the new listener.
  139. 3) Make direct inbound calls to the provided listener's methods. This
  140. short-circuits the interceptor stack.</p>
  141. <p>Do not modify the listener passed in. Either pass it along unmodified,
  142. ignore it, or call methods on it to short-circuit the call.</p>
  143. <p>To intercept errors, implement the <code>onReceiveStatus</code> method and test for
  144. <code>status.code !== grpc.status.OK</code>.</p>
  145. <p>To intercept trailers, examine <code>status.metadata</code> in the <code>onReceiveStatus</code>
  146. method.</p>
  147. <p>This is a trivial implementation of all interceptor methods:
  148. var interceptor = function(options, nextCall) {
  149. return new InterceptingCall(nextCall(options), {
  150. start: function(metadata, listener, next) {
  151. next(metadata, {
  152. onReceiveMetadata: function (metadata, next) {
  153. next(metadata);
  154. },
  155. onReceiveMessage: function (message, next) {
  156. next(message);
  157. },
  158. onReceiveStatus: function (status, next) {
  159. next(status);
  160. },
  161. });
  162. },
  163. sendMessage: function(message, next) {
  164. next(message);
  165. },
  166. halfClose: function(next) {
  167. next();
  168. },
  169. cancel: function(message, next) {
  170. next();
  171. }
  172. });
  173. };</p>
  174. <p>This is an interceptor with a single method:
  175. var interceptor = function(options, nextCall) {
  176. return new InterceptingCall(nextCall(options), {
  177. sendMessage: function(message, next) {
  178. next(message);
  179. }
  180. });
  181. };</p>
  182. <p>Builders are provided for convenience: StatusBuilder, ListenerBuilder,
  183. and RequesterBuilder</p>
  184. <p>gRPC client operations use this mapping to interceptor methods:</p>
  185. <p>grpc.opType.SEND_INITIAL_METADATA -&gt; start
  186. grpc.opType.SEND_MESSAGE -&gt; sendMessage
  187. grpc.opType.SEND_CLOSE_FROM_CLIENT -&gt; halfClose
  188. grpc.opType.RECV_INITIAL_METADATA -&gt; onReceiveMetadata
  189. grpc.opType.RECV_MESSAGE -&gt; onReceiveMessage
  190. grpc.opType.RECV_STATUS_ON_CLIENT -&gt; onReceiveStatus</p></div>
  191. <dl class="details">
  192. </dl>
  193. </div>
  194. <h3 class="subsection-title">Classes</h3>
  195. <dl>
  196. <dt><a href="module-src_client_interceptors-EndListener.html">EndListener</a></dt>
  197. <dd></dd>
  198. <dt><a href="module-src_client_interceptors-InterceptingCall.html">InterceptingCall</a></dt>
  199. <dd></dd>
  200. <dt><a href="module-src_client_interceptors-InterceptingListener.html">InterceptingListener</a></dt>
  201. <dd></dd>
  202. <dt><a href="module-src_client_interceptors-InterceptorConfigurationError.html">InterceptorConfigurationError</a></dt>
  203. <dd></dd>
  204. <dt><a href="module-src_client_interceptors-ListenerBuilder.html">ListenerBuilder</a></dt>
  205. <dd></dd>
  206. <dt><a href="module-src_client_interceptors-RequesterBuilder.html">RequesterBuilder</a></dt>
  207. <dd></dd>
  208. <dt><a href="module-src_client_interceptors-StatusBuilder.html">StatusBuilder</a></dt>
  209. <dd></dd>
  210. </dl>
  211. <h3 class="subsection-title">Methods</h3>
  212. <dl>
  213. <hr>
  214. <dt>
  215. <h4 class="name" id="~getCall"><span class="type-signature">&lt;inner> </span>getCall(channel, path [, options])</h4>
  216. </dt>
  217. <dd>
  218. <div class="description">
  219. <p>Get a call object built with the provided options.</p>
  220. </div>
  221. <h5>Parameters:</h5>
  222. <table class="params table table-striped">
  223. <thead>
  224. <tr>
  225. <th>Name</th>
  226. <th>Type</th>
  227. <th>Argument</th>
  228. <th class="last">Description</th>
  229. </tr>
  230. </thead>
  231. <tbody>
  232. <tr>
  233. <td class="name"><code>channel</code></td>
  234. <td class="type">
  235. <span class="param-type"><a href="grpc.Channel.html">grpc.Channel</a></span>
  236. </td>
  237. <td class="attributes">
  238. </td>
  239. <td class="description last"></td>
  240. </tr>
  241. <tr>
  242. <td class="name"><code>path</code></td>
  243. <td class="type">
  244. <span class="param-type">string</span>
  245. </td>
  246. <td class="attributes">
  247. </td>
  248. <td class="description last"></td>
  249. </tr>
  250. <tr>
  251. <td class="name"><code>options</code></td>
  252. <td class="type">
  253. <span class="param-type"><a href="grpc.Client.html#~CallOptions">grpc.Client~CallOptions</a></span>
  254. </td>
  255. <td class="attributes">
  256. &lt;optional><br>
  257. </td>
  258. <td class="description last"><p>Options object.</p></td>
  259. </tr>
  260. </tbody>
  261. </table>
  262. <dl class="details">
  263. </dl>
  264. </dd>
  265. <hr>
  266. <dt>
  267. <h4 class="name" id="~getInterceptingCall"><span class="type-signature">&lt;inner> </span>getInterceptingCall(method_definition, options, interceptors, channel, responder)</h4>
  268. </dt>
  269. <dd>
  270. <h5>Parameters:</h5>
  271. <table class="params table table-striped">
  272. <thead>
  273. <tr>
  274. <th>Name</th>
  275. <th>Type</th>
  276. <th class="last">Description</th>
  277. </tr>
  278. </thead>
  279. <tbody>
  280. <tr>
  281. <td class="name"><code>method_definition</code></td>
  282. <td class="type">
  283. <span class="param-type"><a href="grpc.html#~MethodDefinition">grpc~MethodDefinition</a></span>
  284. </td>
  285. <td class="description last"></td>
  286. </tr>
  287. <tr>
  288. <td class="name"><code>options</code></td>
  289. <td class="type">
  290. <span class="param-type"><a href="grpc.Client.html#~CallOptions">grpc.Client~CallOptions</a></span>
  291. </td>
  292. <td class="description last"></td>
  293. </tr>
  294. <tr>
  295. <td class="name"><code>interceptors</code></td>
  296. <td class="type">
  297. <span class="param-type">Array.&lt;<a href="global.html#Interceptor">Interceptor</a>></span>
  298. </td>
  299. <td class="description last"></td>
  300. </tr>
  301. <tr>
  302. <td class="name"><code>channel</code></td>
  303. <td class="type">
  304. <span class="param-type"><a href="grpc.Channel.html">grpc.Channel</a></span>
  305. </td>
  306. <td class="description last"></td>
  307. </tr>
  308. <tr>
  309. <td class="name"><code>responder</code></td>
  310. <td class="type">
  311. <span class="param-type">function</span>
  312. |
  313. <span class="param-type">EventEmitter</span>
  314. </td>
  315. <td class="description last"></td>
  316. </tr>
  317. </tbody>
  318. </table>
  319. <dl class="details">
  320. </dl>
  321. </dd>
  322. <hr>
  323. <dt>
  324. <h4 class="name" id="~getLastListener"><span class="type-signature">&lt;inner> </span>getLastListener(method_definition, emitter [, callback])</h4>
  325. </dt>
  326. <dd>
  327. <div class="description">
  328. <p>Creates the last listener in an interceptor stack.</p>
  329. </div>
  330. <h5>Parameters:</h5>
  331. <table class="params table table-striped">
  332. <thead>
  333. <tr>
  334. <th>Name</th>
  335. <th>Type</th>
  336. <th>Argument</th>
  337. <th class="last">Description</th>
  338. </tr>
  339. </thead>
  340. <tbody>
  341. <tr>
  342. <td class="name"><code>method_definition</code></td>
  343. <td class="type">
  344. <span class="param-type"><a href="grpc.html#~MethodDefinition">grpc~MethodDefinition</a></span>
  345. </td>
  346. <td class="attributes">
  347. </td>
  348. <td class="description last"></td>
  349. </tr>
  350. <tr>
  351. <td class="name"><code>emitter</code></td>
  352. <td class="type">
  353. <span class="param-type">EventEmitter</span>
  354. </td>
  355. <td class="attributes">
  356. </td>
  357. <td class="description last"></td>
  358. </tr>
  359. <tr>
  360. <td class="name"><code>callback</code></td>
  361. <td class="type">
  362. <span class="param-type">function</span>
  363. </td>
  364. <td class="attributes">
  365. &lt;optional><br>
  366. </td>
  367. <td class="description last"></td>
  368. </tr>
  369. </tbody>
  370. </table>
  371. <dl class="details">
  372. </dl>
  373. <h5>Returns:</h5>
  374. <dl>
  375. <dt>
  376. Type
  377. </dt>
  378. <dd>
  379. <span class="param-type"><a href="grpc.html#~Listener">grpc~Listener</a></span>
  380. </dd>
  381. </dl>
  382. </dd>
  383. <hr>
  384. <dt>
  385. <h4 class="name" id="~resolveInterceptorProviders"><span class="type-signature">&lt;inner> </span>resolveInterceptorProviders(providers, method_definition)</h4>
  386. </dt>
  387. <dd>
  388. <div class="description">
  389. <p>Transforms a list of interceptor providers into interceptors.</p>
  390. </div>
  391. <h5>Parameters:</h5>
  392. <table class="params table table-striped">
  393. <thead>
  394. <tr>
  395. <th>Name</th>
  396. <th>Type</th>
  397. <th class="last">Description</th>
  398. </tr>
  399. </thead>
  400. <tbody>
  401. <tr>
  402. <td class="name"><code>providers</code></td>
  403. <td class="type">
  404. <span class="param-type">Array.&lt;<a href="global.html#InterceptorProvider">InterceptorProvider</a>></span>
  405. </td>
  406. <td class="description last"></td>
  407. </tr>
  408. <tr>
  409. <td class="name"><code>method_definition</code></td>
  410. <td class="type">
  411. <span class="param-type"><a href="grpc.html#~MethodDefinition">grpc~MethodDefinition</a></span>
  412. </td>
  413. <td class="description last"></td>
  414. </tr>
  415. </tbody>
  416. </table>
  417. <dl class="details">
  418. </dl>
  419. <h5>Returns:</h5>
  420. <dl>
  421. <dt>
  422. Type
  423. </dt>
  424. <dd>
  425. <span class="param-type">null</span>
  426. |
  427. <span class="param-type">Array.&lt;<a href="global.html#Interceptor">Interceptor</a>></span>
  428. </dd>
  429. </dl>
  430. </dd>
  431. </dl>
  432. </article>
  433. </section>
  434. </div>
  435. </div>
  436. <div class="clearfix"></div>
  437. <div class="col-md-3">
  438. <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
  439. </div>
  440. </div>
  441. </div>
  442. <div class="modal fade" id="searchResults">
  443. <div class="modal-dialog">
  444. <div class="modal-content">
  445. <div class="modal-header">
  446. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  447. <h4 class="modal-title">Search results</h4>
  448. </div>
  449. <div class="modal-body"></div>
  450. <div class="modal-footer">
  451. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  452. </div>
  453. </div><!-- /.modal-content -->
  454. </div><!-- /.modal-dialog -->
  455. </div>
  456. <footer>
  457. <span class="jsdoc-message">
  458. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
  459. on 2019-07-15T16:38:16-07:00
  460. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
  461. </span>
  462. </footer>
  463. <script src="scripts/docstrap.lib.js"></script>
  464. <script src="scripts/toc.js"></script>
  465. <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
  466. <script>
  467. $( function () {
  468. $( "[id*='$']" ).each( function () {
  469. var $this = $( this );
  470. $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
  471. } );
  472. $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
  473. var $this = $( this );
  474. var example = $this.find( "code" );
  475. exampleText = example.html();
  476. var lang = /{@lang (.*?)}/.exec( exampleText );
  477. if ( lang && lang[1] ) {
  478. exampleText = exampleText.replace( lang[0], "" );
  479. example.html( exampleText );
  480. lang = lang[1];
  481. } else {
  482. var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
  483. lang = langClassMatch ? langClassMatch[1] : "javascript";
  484. }
  485. if ( lang ) {
  486. $this
  487. .addClass( "sunlight-highlight-" + lang )
  488. .addClass( "linenums" )
  489. .html( example.html() );
  490. }
  491. } );
  492. Sunlight.highlightAll( {
  493. lineNumbers : false,
  494. showMenu : true,
  495. enableDoclinks : true
  496. } );
  497. $.catchAnchorLinks( {
  498. navbarOffset: 10
  499. } );
  500. $( "#toc" ).toc( {
  501. anchorName : function ( i, heading, prefix ) {
  502. return $( heading ).attr( "id" ) || ( prefix + i );
  503. },
  504. selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
  505. showAndHide : false,
  506. smoothScrolling: true
  507. } );
  508. $( "#main span[id^='toc']" ).addClass( "toc-shim" );
  509. $( '.dropdown-toggle' ).dropdown();
  510. $( "table" ).each( function () {
  511. var $this = $( this );
  512. $this.addClass('table');
  513. } );
  514. } );
  515. </script>
  516. <!--Navigation and Symbol Display-->
  517. <!--Google Analytics-->
  518. <script type="text/javascript">
  519. $(document).ready(function() {
  520. SearcherDisplay.init();
  521. });
  522. </script>
  523. </body>
  524. </html>