This file is indexed.

/usr/share/mozart/doc/system/node47.html is in mozart-doc 1.4.0-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>12 Connecting Computations: Connection</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node46.html#chapter.dp">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node48.html#chapter.remote">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="chapter.connection"><H1><A name="chapter.connection">12 Connecting Computations: <CODE>Connection</CODE></A></H1><P> Oz uses a ticket-based mechanism to establish connections between independent Oz processes. One process (called <A name="label516"></A><EM>server</EM>) creates a ticket with which other sites (called <A name="label517"></A><EM>clients</EM>) can establish a connection. </P><P> A <A name="label518"></A><EM>ticket</EM> is a character string which can be stored and transported through all media that can handle text, e.g., phone lines, electronic mail, paper, and so forth. Tickets are insecure, in that they can be forged. The following is an example ticket encoded as an Oz atom: </P><BLOCKQUOTE class="code"><CODE><SPAN class="string">'oz-ticket://130.104.228.81:9000/h9323679#42'</SPAN></CODE></BLOCKQUOTE><P> </P><P> The ticket identifies both the server and the value to which a remote reference will be made. Independent connections can be made to different values on the same server. Once an initial connection is established by the value exchanged, then further connections as desired by applications can be built from programming abstractions, like object, classes, ports or procedures. </P><P> Two different types of connections and tickets are supported: </P><DL><DT><A name="label519"></A><EM>One-to-one connections</EM> and <A name="label520"></A><EM>one-shot tickets</EM>. </DT><DD><P>Allow to establish a single connection only. </P></DD><DT><A name="label521"></A><EM>Many-to-one connections</EM> and <A name="label522"></A><EM>many-shot tickets</EM>. </DT><DD><P>Allow multiple connections with the same ticket to the same value. </P></DD></DL><P> </P><P> The module <A name="label523"></A><SPAN class="index"><CODE>Connection</CODE></SPAN> provides procedures and classes that support both one-to-one and many-to-one connections. </P><DIV id="section.connection.one"><H2><A name="section.connection.one">12.1 One-to-one Connections</A></H2><P> </P><DL><DT><A name="label524"></A><SPAN class="index"><CODE>offerOnce</CODE></SPAN>, <A name="label525"></A><SPAN class="index"><CODE>offer</CODE></SPAN> <A name="label526"></A> <A name="label527"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Connection<SPAN class="keyword">.</SPAN>offerOnce&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>TicketA</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>Returns the single-shot ticket <CODE><I>TicketA</I></CODE> (an atom) under which the value <CODE><I>X</I></CODE> is offered. </P><P> The value <CODE><I>X</I></CODE> is exported immediately. An exception is raised, if exportation of <CODE><I>X</I></CODE> fails, because <CODE><I>X</I></CODE> refers to sited entities. </P></DD><DT><A name="label528"></A><SPAN class="index"><CODE>take</CODE></SPAN> <A name="label529"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Connection<SPAN class="keyword">.</SPAN>take&nbsp;</CODE><CODE>+<I>TicketV</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>Returns the value <CODE><I>X</I></CODE> offered under the ticket <CODE><I>TicketV</I></CODE> (a virtual string). </P><P> Waits until the connection to the offering process is established and the ticket has been acknowledged by that process. </P><P> Raises an exception if the ticket is illegal, or if the offering process does not longer exist. </P><P> Also works for many-shot tickets, where an exception might be raised if the same ticket is used more than once. </P></DD></DL><P> </P></DIV><DIV id="section.connection.many"><H2><A name="section.connection.many">12.2 Many-to-one Connections</A></H2><P> </P><DL><DT><A name="label530"></A><SPAN class="index"><CODE>offerMany</CODE></SPAN>, <A name="label531"></A><SPAN class="index"><CODE>offerUnlimited</CODE></SPAN> <A name="label532"></A> <A name="label533"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Connection<SPAN class="keyword">.</SPAN>offerMany&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>TicketA</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>offers the value <CODE><I>X</I></CODE> under the returned many-shot ticket <CODE><I>TicketA</I></CODE> (an atom). </P><P> The value <CODE><I>X</I></CODE> is exported immediately. An exception is raised, if exportation of <CODE><I>X</I></CODE> fails, because <CODE><I>X</I></CODE> might refer to sited entities. </P><P> The ticket remains valid until it is retracted, or the current Oz process terminates. </P></DD><DT><A name="label534"></A><SPAN class="index"><CODE>retract</CODE></SPAN> <A name="label535"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Connection<SPAN class="keyword">.</SPAN>retract&nbsp;</CODE><CODE>+<I>TicketA</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>retracts the ticket <CODE><I>TicketA</I></CODE> (an atom). The ticket is discarded, and any future attempt to take it will fail. </P><P> A one-shot ticket is nothing more than a many-shot ticket that is automatically retracted once it is taken. </P></DD></DL><P> </P><H3><A name="label536">12.2.1 Gates</A></H3><P> Values for many-to-one connections can also be offered through <A name="label537"></A><EM>gates</EM>. Gates provide many-shot tickets with an object interface. Values offered through gates can be taken with <A name="label538"></A><SPAN class="index"><CODE>Connection<SPAN class="keyword">.</SPAN>take</CODE></SPAN> as described above. </P><P> Gates are provided as instances of the class <A name="label539"></A><SPAN class="index"><CODE>Connection<SPAN class="keyword">.</SPAN>gate</CODE></SPAN>. The methods of <CODE>Connection<SPAN class="keyword">.</SPAN>gate</CODE> are as follows. </P><P> </P><DL><DT><A name="label540"></A><SPAN class="index"><CODE>init</CODE></SPAN> <A name="label541"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>init(</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE><I>TicketA</I></CODE><CODE>&nbsp;<SPAN class="keyword">&lt;=</SPAN>&nbsp;_)</CODE> </P></BLOCKQUOTE></DD><DD><P>Optionally returns the many-shot ticket <CODE><I>TicketA</I></CODE> (an atom) under which the value <CODE><I>X</I></CODE> is offered. </P><P> The value <CODE><I>X</I></CODE> is exported immediately. An exception is raised, if exportation of <CODE><I>X</I></CODE> fails, because <CODE><I>X</I></CODE> might refer to sited entities. </P></DD><DT><A name="label542"></A><SPAN class="index"><CODE>getTicket</CODE></SPAN> <A name="label543"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>getTicket(</CODE><CODE><I>TicketA</I></CODE><CODE>)</CODE> </P></BLOCKQUOTE></DD><DD><P>Returns the many-shot ticket <CODE><I>TicketA</I></CODE> (an atom) of the gate. </P></DD><DT><A name="label544"></A><SPAN class="index"><CODE>close</CODE></SPAN> <A name="label545"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>close()</CODE> </P></BLOCKQUOTE></DD><DD><P>Closes the gate, which makes further use of the associated ticket illegal. </P></DD></DL><P> </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node46.html#chapter.dp">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node48.html#chapter.remote">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys&nbsp;Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A>, <A href="http://www.ps.uni-sb.de/~homik/">Martin&nbsp;Homik</A>, <A href="http://www.ps.uni-sb.de/~tmueller/">Tobias&nbsp;Müller</A>, <A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A> and&nbsp;<A href="http://www.info.ucl.ac.be/~pvr">Peter&nbsp;Van Roy</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>