1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>Documentation Class: InterceptingCall</title>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
- <link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
- </head>
- <body>
- <div class="navbar navbar-default navbar-fixed-top ">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand" href="index.html">Documentation</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="topNavigation">
- <ul class="nav navbar-nav">
-
- <li class="dropdown">
- <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
- <ul class="dropdown-menu ">
- <li><a href="grpc.html">grpc</a></li><li><a href="grpc.credentials.html">grpc.credentials</a></li>
- </ul>
- </li>
-
- <li class="dropdown">
- <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
- <ul class="dropdown-menu ">
- <li><a href="module-src_client_interceptors.html">src/client_interceptors</a></li>
- </ul>
- </li>
-
- <li class="dropdown">
- <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
- <ul class="dropdown-menu ">
- <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>
- </ul>
- </li>
-
- <li class="dropdown">
- <a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
- <ul class="dropdown-menu ">
- <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>
- </ul>
- </li>
-
- <li class="dropdown">
- <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
- <ul class="dropdown-menu ">
- <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>
- </ul>
- </li>
-
- <li class="dropdown">
- <a href="externals.list.html" class="dropdown-toggle" data-toggle="dropdown">Externals<b class="caret"></b></a>
- <ul class="dropdown-menu ">
- <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>
- </ul>
- </li>
-
- </ul>
-
- <div class="col-sm-3 col-md-3">
- <form class="navbar-form" role="search">
- <div class="input-group">
- <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
- <div class="input-group-btn">
- <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
- </div>
- </div>
- </form>
- </div>
-
- </div>
- </div>
- </div>
- <div class="container" id="toc-content">
- <div class="row">
-
- <div class="col-md-8">
-
- <div id="main">
-
- <h1 class="page-title">Class: InterceptingCall</h1>
- <section>
- <header>
-
- <h2>
- <span class="ancestors"><a href="module-src_client_interceptors.html">src/client_interceptors</a>~</span>
-
- InterceptingCall
- </h2>
-
-
- </header>
- <article>
- <div class="container-overview">
-
-
- <hr>
- <dt>
- <h4 class="name" id="InterceptingCall"><span class="type-signature"></span>new InterceptingCall(next_call [, requester])</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>A chainable gRPC call proxy which will delegate to an optional requester
- object. By default, interceptor methods will chain to next_call. If a
- requester is provided which implements an interceptor method, that
- requester method will be executed as part of the chain.</p>
- </div>
-
-
-
-
-
- <h5>Parameters:</h5>
-
- <table class="params table table-striped">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
- <th>Argument</th>
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
-
- <td class="name"><code>next_call</code></td>
-
- <td class="type">
-
-
- <span class="param-type">InterceptingCall</span>
- |
- <span class="param-type">null</span>
-
- </td>
-
- <td class="attributes">
-
-
-
- </td>
-
-
- <td class="description last"><p>The next call in the chain</p></td>
- </tr>
-
- <tr>
-
- <td class="name"><code>requester</code></td>
-
- <td class="type">
-
-
- <span class="param-type"><a href="grpc.html#~Requester">grpc~Requester</a></span>
-
- </td>
-
- <td class="attributes">
-
- <optional><br>
-
-
-
- </td>
-
-
- <td class="description last"><p>Interceptor methods to handle request
- operations.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
- </div>
-
-
-
-
-
-
-
- <h3 class="subsection-title">Methods</h3>
- <dl>
-
- <hr>
- <dt>
- <h4 class="name" id="cancel"><span class="type-signature"></span>cancel()</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>Run a cancel operation through the interceptor chain</p>
- </div>
-
-
-
-
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="cancelWithStatus"><span class="type-signature"></span>cancelWithStatus(code, details)</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>Run a cancelWithStatus operation through the interceptor chain.</p>
- </div>
-
-
-
-
-
- <h5>Parameters:</h5>
-
- <table class="params table table-striped">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
-
- <td class="name"><code>code</code></td>
-
- <td class="type">
-
-
- <span class="param-type">number</span>
-
- </td>
-
-
- <td class="description last"></td>
- </tr>
-
- <tr>
-
- <td class="name"><code>details</code></td>
-
- <td class="type">
-
-
- <span class="param-type">string</span>
-
- </td>
-
-
- <td class="description last"></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="getPeer"><span class="type-signature"></span>getPeer()</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>Pass a getPeer call down to the base gRPC call (should not be intercepted)</p>
- </div>
-
-
-
-
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
- <h5>Returns:</h5>
-
-
- <dl>
- <dt>
- Type
- </dt>
- <dd>
-
- <span class="param-type">object</span>
- </dd>
- </dl>
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="halfClose"><span class="type-signature"></span>halfClose()</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>Run a close operation through the interceptor chain</p>
- </div>
-
-
-
-
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="recvMessageWithContext"><span class="type-signature"></span>recvMessageWithContext(context)</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>For receiving streaming messages, we need to seed the base interceptor with
- the streaming context to create a RECV_MESSAGE batch.</p>
- </div>
-
-
-
-
-
- <h5>Parameters:</h5>
-
- <table class="params table table-striped">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
-
- <td class="name"><code>context</code></td>
-
- <td class="type">
-
-
- <span class="param-type">object</span>
-
- </td>
-
-
- <td class="description last"><p>Carries objects needed for streaming operations</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="sendMessage"><span class="type-signature"></span>sendMessage(message)</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>Pass a message through the interceptor chain.</p>
- </div>
-
-
-
-
-
- <h5>Parameters:</h5>
-
- <table class="params table table-striped">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
-
- <td class="name"><code>message</code></td>
-
- <td class="type">
-
-
- <span class="param-type">jspb.Message</span>
-
- </td>
-
-
- <td class="description last"></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="sendMessageWithContext"><span class="type-signature"></span>sendMessageWithContext(context, message)</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>For streaming calls, we need to transparently pass the stream's context
- through the interceptor chain. Passes the context between InterceptingCalls
- but hides it from any requester implementations.</p>
- </div>
-
-
-
-
-
- <h5>Parameters:</h5>
-
- <table class="params table table-striped">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
-
- <td class="name"><code>context</code></td>
-
- <td class="type">
-
-
- <span class="param-type">object</span>
-
- </td>
-
-
- <td class="description last"><p>Carries objects needed for streaming operations.</p></td>
- </tr>
-
- <tr>
-
- <td class="name"><code>message</code></td>
-
- <td class="type">
-
-
- <span class="param-type">jspb.Message</span>
-
- </td>
-
-
- <td class="description last"><p>The message to send.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
-
-
- <hr>
- <dt>
- <h4 class="name" id="start"><span class="type-signature"></span>start(metadata, listener)</h4>
-
-
- </dt>
- <dd>
-
- <div class="description">
- <p>Starts a call through the outbound interceptor chain and adds an element to
- the reciprocal inbound listener chain.</p>
- </div>
-
-
-
-
-
- <h5>Parameters:</h5>
-
- <table class="params table table-striped">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
-
- <td class="name"><code>metadata</code></td>
-
- <td class="type">
-
-
- <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
-
- </td>
-
-
- <td class="description last"><p>The outgoing metadata.</p></td>
- </tr>
-
- <tr>
-
- <td class="name"><code>listener</code></td>
-
- <td class="type">
-
-
- <span class="param-type"><a href="grpc.html#~Listener">grpc~Listener</a></span>
-
- </td>
-
-
- <td class="description last"><p>An intercepting listener for inbound
- operations.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </dl>
-
-
-
-
-
-
-
- </dd>
- </dl>
-
-
-
- </article>
- </section>
- </div>
- </div>
- <div class="clearfix"></div>
-
- <div class="col-md-3">
- <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
- </div>
-
- </div>
- </div>
- <div class="modal fade" id="searchResults">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title">Search results</h4>
- </div>
- <div class="modal-body"></div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div>
- <footer>
- <span class="jsdoc-message">
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
-
- on 2019-07-15T16:38:16-07:00
-
- using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
- </span>
- </footer>
- <script src="scripts/docstrap.lib.js"></script>
- <script src="scripts/toc.js"></script>
- <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
- <script>
- $( function () {
- $( "[id*='$']" ).each( function () {
- var $this = $( this );
- $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
- } );
- $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
- var $this = $( this );
- var example = $this.find( "code" );
- exampleText = example.html();
- var lang = /{@lang (.*?)}/.exec( exampleText );
- if ( lang && lang[1] ) {
- exampleText = exampleText.replace( lang[0], "" );
- example.html( exampleText );
- lang = lang[1];
- } else {
- var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
- lang = langClassMatch ? langClassMatch[1] : "javascript";
- }
- if ( lang ) {
- $this
- .addClass( "sunlight-highlight-" + lang )
- .addClass( "linenums" )
- .html( example.html() );
- }
- } );
- Sunlight.highlightAll( {
- lineNumbers : false,
- showMenu : true,
- enableDoclinks : true
- } );
- $.catchAnchorLinks( {
- navbarOffset: 10
- } );
- $( "#toc" ).toc( {
- anchorName : function ( i, heading, prefix ) {
- return $( heading ).attr( "id" ) || ( prefix + i );
- },
- selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
- showAndHide : false,
- smoothScrolling: true
- } );
- $( "#main span[id^='toc']" ).addClass( "toc-shim" );
- $( '.dropdown-toggle' ).dropdown();
- $( "table" ).each( function () {
- var $this = $( this );
- $this.addClass('table');
- } );
- } );
- </script>
- <!--Navigation and Symbol Display-->
- <!--Google Analytics-->
- <script type="text/javascript">
- $(document).ready(function() {
- SearcherDisplay.init();
- });
- </script>
- </body>
- </html>
|