Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 141 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -680,12 +680,24 @@ <h3>Endpoints</h3>
<td><a>New Session</a></td>
</tr>

<tr>
<td>GET</td>
<td>/session/{session id}</td>
<td><a>Get Session</a></td>
</tr>

<tr>
<td>DELETE</td>
<td>/session/{<var>session id</var>}</td>
<td><a>Delete Session</a></td>
</tr>

<tr>
<td>POST</td>
<td>/session/async</td>
<td><a>Async New Session</a></td>
</tr>

<tr>
<td>GET</td>
<td>/status</td>
Expand Down Expand Up @@ -1289,6 +1301,14 @@ <h3>Errors</h3>
but did not match an method for that URL.
</tr>

<tr>
<td><dfn>unknown session</dfn>
<td>404
<td><code>unknown session</code>
<td>The requested <a>sessionId</a> did not match
with any <a>sessionId</a> known by a node.
</tr>

<tr>
<td><dfn>unsupported operation</dfn>
<td>500
Expand Down Expand Up @@ -2139,8 +2159,15 @@ <h2>Sessions</h2>
an <a>intermediary node</a> will also <a>close the session</a> of
the <a>associated session</a>.

<p>All <a>commands</a>, except <a>New Session</a> and <a>Status</a>,
have an associated <dfn>current session</dfn>,
<p>An <a>intermediary node</a> will also maintain a list of
<dfn>session creation jobs</dfn>. These include a mapping from
a <dfn>session creation id</dfn> to a <a>session id</a> of
an <a>associated session</a>.

<a>New Session</a>, <a>Async New Session</a>, and <a>Status</a> <a>commands</a>
have no associated <a>session</a> or <a>session creation job</a>.

<p>All other <a>commands</a> have an associated <dfn>current session</dfn>,
which is the <a>session</a> in which that <a>command</a> will run.

<p>A <a>remote end</a> has an associated list of
Expand Down Expand Up @@ -2449,6 +2476,55 @@ <h3 id=new-session><dfn data-lt="new sessions|creating a new session">New Sessio
</ol>
</section> <!-- /New Session -->

<section>
<h3><dfn>Get Session</dfn></h3>

<table class="simple jsoncommand">
<tr>
<th>HTTP Method</th>
<th>URI Template</th>
</tr>
<tr>
<td>GET</td>
<td>/session/{session id}</td>
</tr>
</table>

<p>The <a>remote end steps</a> are:

<ol>
<li><p>Let <var>session</var> be a job in <a>active sessions</a>
with a <a>session id</a> matching <var>session id</var>

<li><p>If <a>Remote end</a> is an <a>endpoint node</a> and
<var>session</var> is <code>null</code>, return <a>error</a>
with <a>error code</a> <a>unknown session</a>.

<li><p>If <a>Remote end</a> is an <a>intermediary node</a> and
<var>session</var> is <code>null</code>, let <var>session</var>
be a job in <a>session creation job</a> with a <a>session id</a>
matching <var>session creation id</var>

<li><p>If <a>Remote end</a> is an <a>intermediary node</a> and
<var>session</var> is <code>null</code>, return <a>error</a>
with <a>error code</a> <a>unknown session</a>.

<li><p>Let <var>body</var> be a JSON <a>Object</a> initialised with:
<dl>
<dl>
<dt>"<code>sessionId</code>"
<dd>The <a>session id</a> of the <a>current session</a>.

<dt>"<code>capabilities</code>"
<dd>The capabilities of the <a>current session</a>.
</dl>
</dl>

<li><p>Return success with data <var>body</var>.
This conversation was marked as resolved by christian-bromann
</ol>
</section> <!-- /Get Session -->

<section>
<h3><dfn>Delete Session</dfn></h3>

Expand All @@ -2473,6 +2549,69 @@ <h3><dfn>Delete Session</dfn></h3>
</ol>
</section> <!-- /Delete Session -->

<section>
<h3><dfn>Async New Session</dfn></h3>

<table class="simple jsoncommand">
<tr>
<th>HTTP Method</th>
<th>URI Template</th>
</tr>
<tr>
<td>POST</td>
<td>/session/async</td>
</tr>
</table>

<p>The <a>remote end</a> steps are:

<ol>
<li><p>Perform the following substeps based on the <a>remote end</a>’s type:
<dl class=switch>
<dt><a>Remote end</a> is an <a>endpoint node</a>
<dd>
<ol>
<li><p>Let <var>session</var> be a job iniated by following the same steps
defined in <a>New Session</a>

<li><p>Let <var>body</var> be a new JSON <a>Object</a> with the following
properties:

<dl>
<dt>"<code>sessionCreationId</code>"
<dd>The <a>session id</a> of the <a>session</a>.
</dl>

<li><p>Return <a>success</a> with data <var>body</var>.
</ol>

<dt><a>Remote end</a> is an <a>intermediary node</a>
<dd>
<ol>
<li><p>Use the result of the <a>capabilities processing</a> algorithm
to route the <a>new session</a> request to the appropriate <a>endpoint node</a>.
An <a>intermediary node</a> is free to define <a>extension capabilities</a>
to assist in this process, however, these specific capabilities
must not be forwarded to the <a>endpoint node</a>.

<li><p>Let <var>session creation job</var> be a new JSON <a>Object</a>
with the following properties:

<dl>
<dt>"<code>sessionCreationId</code>"
<dd>The result of <a>generating a UUID</a>.
</dl>

<li>Add the <var>session creation job</var> to the list of
<a>session creation jobs</a>.

<li><p>Return <a>success</a> with data <var>session creation job</var>.
</ol>
</dl>
</ol>

</section> <!-- /Async New Session -->

<section>
<h3><dfn>Status</dfn></h3>

Expand Down