/usr/share/doc/libxmlrpc-light-ocaml-dev/html/api/XmlRpc.multicall-c.html is in libxmlrpc-light-ocaml-dev 0.6.1-3+b7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="XmlRpc.client-c.html">
<link rel="Up" href="XmlRpc.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="XmlRpc" rel="Chapter" href="XmlRpc.html">
<link title="XmlRpcBase64" rel="Chapter" href="XmlRpcBase64.html">
<link title="XmlRpcDateTime" rel="Chapter" href="XmlRpcDateTime.html">
<link title="XmlRpcServer" rel="Chapter" href="XmlRpcServer.html"><title>XmlRpc.multicall</title>
</head>
<body>
<div class="navbar"><a class="pre" href="XmlRpc.client-c.html" title="XmlRpc.client">Previous</a>
<a class="up" href="XmlRpc.html" title="XmlRpc">Up</a>
</div>
<h1>Class <a href="type_XmlRpc.multicall.html">XmlRpc.multicall</a></h1>
<pre><span name="TYPEmulticall"><span class="keyword">class</span> multicall</span> : <code class="type"><a href="XmlRpc.client-c.html">client</a> -> </code><code class="code">object</code> <a href="XmlRpc.multicall-c.html">..</a> <code class="code">end</code></pre><div class="info class top">
Convenience class for <code class="code">system.multicall</code> calls.
<p>
Instances take an <a href="XmlRpc.client-c.html"><code class="code">XmlRpc.client</code></a> as an argument: <pre class="codepre"><code class="code"> # let mc = new XmlRpc.multicall client;;
val mc : XmlRpc.multicall = <obj>
</code></pre>
The "call" method works like <code class="code">client#call</code>, but it returns a lazy
value: <pre class="codepre"><code class="code"> # let a = mc#call "demo.addTwoNumbers" [`Int 3; `Int 4];;
val a : XmlRpc.value Lazy.t = <lazy>
# let b = mc#call "demo.addTwoNumbers" [`Int 42; `String "oh noes!"];;
val b : XmlRpc.value Lazy.t = <lazy>
# let c = mc#call "demo.addTwoNumbers" [`Double 3.0; `Double 4.0];;
val c : XmlRpc.value Lazy.t = <lazy>
</code></pre>
At this point, the call has not been executed yet: <pre class="codepre"><code class="code"> # mc#executed;;
-- : bool = false
</code></pre>
As soon as one of the return values is forced, the call is executed: <pre class="codepre"><code class="code"> # Lazy.force a;;
-- : XmlRpc.value = `Int 7
# mc#executed;;
-- : bool = true
</code></pre>
Once a call has been executed, this instance cannot be used to make any
further calls; instead, a new <code class="code">multicall</code> instance must be created: <pre class="codepre"><code class="code"> # mc#call "demo.addTwoNumbers" [`Int 2; `Int 2];;
Exception: Failure "multicall#call: already executed".
</code></pre>
If an XmlRpc fault occurred, the exception will be thrown when the lazy
value is forced: <pre class="codepre"><code class="code"> # Lazy.force b;;
Exception: XmlRpc.Error (-32602, "server error. invalid method parameters").
</code></pre>
This will not prevent further methods from executing successfully: <pre class="codepre"><code class="code"> # Lazy.force c;;
-- : XmlRpc.value = `Double 7.
</code></pre>
It is possible for a <code class="code">multicall</code> to be executed but not completed, for
example if a transport error occurs. Aside from catching the exception,
the <code class="code">completed</code> property indicates if the call actually went through
or not: <pre class="codepre"><code class="code"> # mc#completed;;
-- : bool = true
</code></pre>
It is not necessary to use lazy values. Instead, the call can be
executed explicitly, and the results can be retrieved by number: <pre class="codepre"><code class="code"> # let mc = new XmlRpc.multicall client;;
val mc : XmlRpc.multicall = <obj>
# ignore (mc#call "demo.addTwoNumbers" [`Int 2; `Int 2]);;
-- : unit = ()
# ignore (mc#call "demo.addTwoNumbers" [`Int 3; `Int 3]);;
-- : unit = ()
# mc#result 1;;
-- : XmlRpc.value = `Int 6
</code></pre><br>
</div>
<hr width="100%">
<pre><span id="METHODcall"><span class="keyword">method</span> call</span> : <code class="type">string -> <a href="XmlRpc.html#TYPEvalue">value</a> list -> <a href="XmlRpc.html#TYPEvalue">value</a> Lazy.t</code></pre><div class="info ">
Adds a call to this <code class="code">multicall</code> instance.
If the call has already executed, the following exception will
be raised:
Failure "multicall#call: already executed".<br>
</div>
<pre><span id="METHODexecute"><span class="keyword">method</span> execute</span> : <code class="type">unit -> unit</code></pre><div class="info ">
Forces the call to execute immediately.
If the call has already executed and completed successfully, the
following exception will be raised:
Failure "multicall#execute: already completed".<br>
</div>
<pre><span id="METHODresult"><span class="keyword">method</span> result</span> : <code class="type">int -> <a href="XmlRpc.html#TYPEvalue">value</a></code></pre><div class="info ">
Returns a <code class="code">multicall</code> result, executing the call if necessary.
The results are numbered starting with zero.<br>
</div>
<pre><span id="METHODexecuted"><span class="keyword">method</span> executed</span> : <code class="type">bool</code></pre><div class="info ">
True if the call has executed, whether or not it succeeded.<br>
</div>
<pre><span id="METHODcompleted"><span class="keyword">method</span> completed</span> : <code class="type">bool</code></pre><div class="info ">
True of the call has executed and completed successfully.<br>
</div>
</body></html>
|