ProtoBuf.Builder.Service.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Service</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Service</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Builder.html">.Builder</a>.</span>
  21. Service
  22. </h2>
  23. <div class="class-description"><p>Barebone of all runtime services.</p></div>
  24. </header>
  25. <article>
  26. <div class="container-overview">
  27. <h2>Constructor</h2>
  28. <h4 class="name" id="Service"><span class="type-signature"></span>new Service<span class="signature">(rpcImpl<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
  29. <div class="description">
  30. <p>Constructs a new runtime Service.</p>
  31. </div>
  32. <h5>Parameters:</h5>
  33. <table class="params">
  34. <thead>
  35. <tr>
  36. <th>Name</th>
  37. <th>Type</th>
  38. <th>Attributes</th>
  39. <th class="last">Description</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <tr>
  44. <td class="name"><code>rpcImpl</code></td>
  45. <td class="type">
  46. <span class="param-type">function</span>
  47. </td>
  48. <td class="attributes">
  49. &lt;optional><br>
  50. </td>
  51. <td class="description last"><p>RPC implementation receiving the method name and the message</p></td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. <dl class="details">
  56. <dt class="tag-source">Source:</dt>
  57. <dd class="tag-source"><ul class="dummy"><li>
  58. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4005">line 4005</a>
  59. </li></ul></dd>
  60. </dl>
  61. <h5>Throws:</h5>
  62. <dl>
  63. <dt>
  64. <div class="param-desc">
  65. <p>If the service cannot be created</p>
  66. </div>
  67. </dt>
  68. <dd></dd>
  69. <dt>
  70. <dl>
  71. <dt>
  72. Type
  73. </dt>
  74. <dd>
  75. <span class="param-type">Error</span>
  76. </dd>
  77. </dl>
  78. </dt>
  79. <dd></dd>
  80. </dl>
  81. </div>
  82. <h3 class="subsection-title">Members</h3>
  83. <h4 class="name" id=".$options"><span class="type-signature">(static) </span>$options<span class="type-signature"> :Object.&lt;string, *></span></h4>
  84. <div class="description">
  85. <p>Service options.</p>
  86. </div>
  87. <h5>Type:</h5>
  88. <ul>
  89. <li>
  90. <span class="param-type">Object.&lt;string, *></span>
  91. </li>
  92. </ul>
  93. <dl class="details">
  94. <dt class="tag-source">Source:</dt>
  95. <dd class="tag-source"><ul class="dummy"><li>
  96. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4108">line 4108</a>
  97. </li></ul></dd>
  98. </dl>
  99. <h4 class="name" id=".$type"><span class="type-signature">(static, non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span></h4>
  100. <div class="description">
  101. <p>Reflection type.</p>
  102. </div>
  103. <h5>Type:</h5>
  104. <ul>
  105. <li>
  106. <span class="param-type"><a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span>
  107. </li>
  108. </ul>
  109. <dl class="details">
  110. <dt class="tag-source">Source:</dt>
  111. <dd class="tag-source"><ul class="dummy"><li>
  112. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4124">line 4124</a>
  113. </li></ul></dd>
  114. </dl>
  115. <h4 class="name" id="$options"><span class="type-signature"></span>$options<span class="type-signature"> :Object.&lt;string, *></span></h4>
  116. <div class="description">
  117. <p>Service options.</p>
  118. </div>
  119. <h5>Type:</h5>
  120. <ul>
  121. <li>
  122. <span class="param-type">Object.&lt;string, *></span>
  123. </li>
  124. </ul>
  125. <dl class="details">
  126. <dt class="tag-source">Source:</dt>
  127. <dd class="tag-source"><ul class="dummy"><li>
  128. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4116">line 4116</a>
  129. </li></ul></dd>
  130. </dl>
  131. <h4 class="name" id="$type"><span class="type-signature">(non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span></h4>
  132. <div class="description">
  133. <p>Reflection type.</p>
  134. </div>
  135. <h5>Type:</h5>
  136. <ul>
  137. <li>
  138. <span class="param-type"><a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span>
  139. </li>
  140. </ul>
  141. <dl class="details">
  142. <dt class="tag-source">Source:</dt>
  143. <dd class="tag-source"><ul class="dummy"><li>
  144. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4132">line 4132</a>
  145. </li></ul></dd>
  146. </dl>
  147. <h4 class="name" id="rpcImpl"><span class="type-signature">(non-null) </span>rpcImpl<span class="type-signature"> :function</span></h4>
  148. <div class="description">
  149. <p>Service implementation.</p>
  150. </div>
  151. <h5>Type:</h5>
  152. <ul>
  153. <li>
  154. <span class="param-type">function</span>
  155. </li>
  156. </ul>
  157. <dl class="details">
  158. <dt class="tag-source">Source:</dt>
  159. <dd class="tag-source"><ul class="dummy"><li>
  160. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4016">line 4016</a>
  161. </li></ul></dd>
  162. </dl>
  163. <h3 class="subsection-title">Methods</h3>
  164. <h4 class="name" id=".%5BMethod%5D"><span class="type-signature">(abstract, static) </span>[Method]<span class="signature">(rpcImpl<span class="signature-attributes">non-null</span>, req, callback)</span><span class="type-signature"></span></h4>
  165. <div class="description">
  166. <p>Asynchronously performs an RPC call using the given RPC implementation.</p>
  167. </div>
  168. <h5>Parameters:</h5>
  169. <table class="params">
  170. <thead>
  171. <tr>
  172. <th>Name</th>
  173. <th>Type</th>
  174. <th class="last">Description</th>
  175. </tr>
  176. </thead>
  177. <tbody>
  178. <tr>
  179. <td class="name"><code>rpcImpl</code></td>
  180. <td class="type">
  181. <span class="param-type">function</span>
  182. </td>
  183. <td class="description last"><p>RPC implementation</p></td>
  184. </tr>
  185. <tr>
  186. <td class="name"><code>req</code></td>
  187. <td class="type">
  188. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  189. </td>
  190. <td class="description last"><p>Request</p></td>
  191. </tr>
  192. <tr>
  193. <td class="name"><code>callback</code></td>
  194. <td class="type">
  195. <span class="param-type">function</span>
  196. </td>
  197. <td class="description last"><p>Callback receiving
  198. the error if any and the response either as a pre-parsed message or as its raw bytes</p></td>
  199. </tr>
  200. </tbody>
  201. </table>
  202. <dl class="details">
  203. <dt class="tag-source">Source:</dt>
  204. <dd class="tag-source"><ul class="dummy"><li>
  205. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4036">line 4036</a>
  206. </li></ul></dd>
  207. </dl>
  208. <h4 class="name" id="%5BMethod%5D"><span class="type-signature">(abstract) </span>[Method]<span class="signature">(req, callback)</span><span class="type-signature"></span></h4>
  209. <div class="description">
  210. <p>Asynchronously performs an RPC call using the instance's RPC implementation.</p>
  211. </div>
  212. <h5>Parameters:</h5>
  213. <table class="params">
  214. <thead>
  215. <tr>
  216. <th>Name</th>
  217. <th>Type</th>
  218. <th class="last">Description</th>
  219. </tr>
  220. </thead>
  221. <tbody>
  222. <tr>
  223. <td class="name"><code>req</code></td>
  224. <td class="type">
  225. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  226. </td>
  227. <td class="description last"><p>Request</p></td>
  228. </tr>
  229. <tr>
  230. <td class="name"><code>callback</code></td>
  231. <td class="type">
  232. <span class="param-type">function</span>
  233. </td>
  234. <td class="description last"><p>Callback receiving
  235. the error if any and the response either as a pre-parsed message or as its raw bytes</p></td>
  236. </tr>
  237. </tbody>
  238. </table>
  239. <dl class="details">
  240. <dt class="tag-source">Source:</dt>
  241. <dd class="tag-source"><ul class="dummy"><li>
  242. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line4047">line 4047</a>
  243. </li></ul></dd>
  244. </dl>
  245. </article>
  246. </section>
  247. </div>
  248. <nav>
  249. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Element.html">Element</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
  250. </nav>
  251. <br class="clear">
  252. <footer>
  253. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Fri Jan 27 2017 17:03:55 GMT+0100 (Mitteleuropäische Zeit)
  254. </footer>
  255. <script> prettyPrint(); </script>
  256. <script src="scripts/linenumber.js"> </script>
  257. </body>
  258. </html>