diff -r c38750e1bafd -r b4bf79b956bc RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.JsonServer.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.JsonServer.html Fri Sep 29 10:32:30 2017 +0200 @@ -0,0 +1,235 @@ +<!DOCTYPE html> +<html><head> +<title>Plugin_Refactoring_Rope.RefactoringRope.JsonServer</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Refactoring_Rope.RefactoringRope.JsonServer</h1> +<p> +Module implementing the JSON based server base class. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#JsonServer">JsonServer</a></td> +<td>Class implementing the JSON based server base class.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="JsonServer" ID="JsonServer"></a> +<h2>JsonServer</h2> +<p> + Class implementing the JSON based server base class. +</p> +<h3>Derived from</h3> +QTcpServer +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#JsonServer.__init__">JsonServer</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#JsonServer.__handleDisconnect">__handleDisconnect</a></td> +<td>Private slot handling a disconnect of the client.</td> +</tr><tr> +<td><a href="#JsonServer.__receiveJson">__receiveJson</a></td> +<td>Private slot handling received data from the client.</td> +</tr><tr> +<td><a href="#JsonServer.connectionNames">connectionNames</a></td> +<td>Public method to get the list of active connection names.</td> +</tr><tr> +<td><a href="#JsonServer.handleCall">handleCall</a></td> +<td>Public method to handle a method call from the client.</td> +</tr><tr> +<td><a href="#JsonServer.handleNewConnection">handleNewConnection</a></td> +<td>Public slot for new incoming connections from a client.</td> +</tr><tr> +<td><a href="#JsonServer.sendJson">sendJson</a></td> +<td>Public method to send a single command to a client.</td> +</tr><tr> +<td><a href="#JsonServer.startClient">startClient</a></td> +<td>Public method to start a client process.</td> +</tr><tr> +<td><a href="#JsonServer.stopAllClients">stopAllClients</a></td> +<td>Public method to stop all clients.</td> +</tr><tr> +<td><a href="#JsonServer.stopClient">stopClient</a></td> +<td>Public method to stop a client process.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="JsonServer.__init__" ID="JsonServer.__init__"></a> +<h4>JsonServer (Constructor)</h4> +<b>JsonServer</b>(<i>name="", multiplex=False, parent=None</i>) +<p> + Constructor +</p><dl> +<dt><i>name</i> (str)</dt> +<dd> +name of the server (used for output only) +</dd><dt><i>multiplex</i> (bool)</dt> +<dd> +flag indicating a multiplexing server +</dd><dt><i>parent</i> (QObject)</dt> +<dd> +parent object +</dd> +</dl><a NAME="JsonServer.__handleDisconnect" ID="JsonServer.__handleDisconnect"></a> +<h4>JsonServer.__handleDisconnect</h4> +<b>__handleDisconnect</b>(<i>idString</i>) +<p> + Private slot handling a disconnect of the client. +</p><dl> +<dt><i>idString</i> (str)</dt> +<dd> +id of the connection been disconnected +</dd> +</dl><a NAME="JsonServer.__receiveJson" ID="JsonServer.__receiveJson"></a> +<h4>JsonServer.__receiveJson</h4> +<b>__receiveJson</b>(<i>idString</i>) +<p> + Private slot handling received data from the client. +</p><dl> +<dt><i>idString</i> (str)</dt> +<dd> +id of the connection been disconnected +</dd> +</dl><a NAME="JsonServer.connectionNames" ID="JsonServer.connectionNames"></a> +<h4>JsonServer.connectionNames</h4> +<b>connectionNames</b>(<i></i>) +<p> + Public method to get the list of active connection names. +</p><p> + If this is not a multiplexing server, an empty list is returned. +</p><dl> +<dt>Returns:</dt> +<dd> +list of active connection names +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl><a NAME="JsonServer.handleCall" ID="JsonServer.handleCall"></a> +<h4>JsonServer.handleCall</h4> +<b>handleCall</b>(<i>method, params</i>) +<p> + Public method to handle a method call from the client. +</p><p> + Note: This is an empty implementation that must be overridden in + derived classes. +</p><dl> +<dt><i>method</i> (str)</dt> +<dd> +requested method name +</dd><dt><i>params</i> (dict)</dt> +<dd> +dictionary with method specific parameters +</dd> +</dl><a NAME="JsonServer.handleNewConnection" ID="JsonServer.handleNewConnection"></a> +<h4>JsonServer.handleNewConnection</h4> +<b>handleNewConnection</b>(<i></i>) +<p> + Public slot for new incoming connections from a client. +</p><a NAME="JsonServer.sendJson" ID="JsonServer.sendJson"></a> +<h4>JsonServer.sendJson</h4> +<b>sendJson</b>(<i>command, params, flush=False, idString=""</i>) +<p> + Public method to send a single command to a client. +</p><dl> +<dt><i>command</i> (str)</dt> +<dd> +command name to be sent +</dd><dt><i>params</i> (dict)</dt> +<dd> +dictionary of named parameters for the command +</dd><dt><i>flush</i> (bool)</dt> +<dd> +flag indicating to flush the data to the socket +</dd><dt><i>idString</i> (str)</dt> +<dd> +id of the connection to send data to +</dd> +</dl><a NAME="JsonServer.startClient" ID="JsonServer.startClient"></a> +<h4>JsonServer.startClient</h4> +<b>startClient</b>(<i>interpreter, clientScript, clientArgs, idString=""</i>) +<p> + Public method to start a client process. +</p><dl> +<dt><i>interpreter</i> (str)</dt> +<dd> +interpreter to be used for the client +</dd><dt><i>clientScript</i> (str)</dt> +<dd> +path to the client script +</dd><dt><i>clientArgs</i></dt> +<dd> +list of arguments for the client +</dd><dt><i>idString</i> (str)</dt> +<dd> +id of the client to be started +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating a successful client start +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl><a NAME="JsonServer.stopAllClients" ID="JsonServer.stopAllClients"></a> +<h4>JsonServer.stopAllClients</h4> +<b>stopAllClients</b>(<i></i>) +<p> + Public method to stop all clients. +</p><a NAME="JsonServer.stopClient" ID="JsonServer.stopClient"></a> +<h4>JsonServer.stopClient</h4> +<b>stopClient</b>(<i>idString=""</i>) +<p> + Public method to stop a client process. +</p><dl> +<dt><i>idString</i> (str)</dt> +<dd> +id of the client to be stopped +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file