--- a/RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.JsonServer.html Fri Oct 11 19:05:23 2019 +0200 +++ b/RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.JsonServer.html Fri Oct 11 19:05:59 2019 +0200 @@ -18,216 +18,288 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<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 /> +<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> +</tr> +<tr> <td><a href="#JsonServer.__handleDisconnect">__handleDisconnect</a></td> <td>Private slot handling a disconnect of the client.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.__receiveJson">__receiveJson</a></td> <td>Private slot handling received data from the client.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.connectionNames">connectionNames</a></td> <td>Public method to get the list of active connection names.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.handleCall">handleCall</a></td> <td>Public method to handle a method call from the client.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.handleNewConnection">handleNewConnection</a></td> <td>Public slot for new incoming connections from a client.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.sendJson">sendJson</a></td> <td>Public method to send a single command to a client.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.startClient">startClient</a></td> <td>Public method to start a client process.</td> -</tr><tr> +</tr> +<tr> <td><a href="#JsonServer.stopAllClients">stopAllClients</a></td> <td>Public method to stop all clients.</td> -</tr><tr> +</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> +</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> +<dt><i>multiplex</i> (bool)</dt> <dd> flag indicating a multiplexing server -</dd><dt><i>parent</i> (QObject)</dt> +</dd> +<dt><i>parent</i> (QObject)</dt> <dd> parent object </dd> -</dl><a NAME="JsonServer.__handleDisconnect" ID="JsonServer.__handleDisconnect"></a> +</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> +</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> +</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> +</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> +</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> +</p> +<p> If this is not a multiplexing server, an empty list is returned. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> list of active connection names </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> list of str </dd> -</dl><a NAME="JsonServer.handleCall" ID="JsonServer.handleCall"></a> +</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> +</p> +<p> Note: This is an empty implementation that must be overridden in derived classes. -</p><dl> +</p> +<dl> + <dt><i>method</i> (str)</dt> <dd> requested method name -</dd><dt><i>params</i> (dict)</dt> +</dd> +<dt><i>params</i> (dict)</dt> <dd> dictionary with method specific parameters </dd> -</dl><a NAME="JsonServer.handleNewConnection" ID="JsonServer.handleNewConnection"></a> +</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> +</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> +</p> +<dl> + <dt><i>command</i> (str)</dt> <dd> command name to be sent -</dd><dt><i>params</i> (dict)</dt> +</dd> +<dt><i>params</i> (dict)</dt> <dd> dictionary of named parameters for the command -</dd><dt><i>flush</i> (bool)</dt> +</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> +<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> +</dl> +<a NAME="JsonServer.startClient" ID="JsonServer.startClient"></a> <h4>JsonServer.startClient</h4> <b>startClient</b>(<i>interpreter, clientScript, clientArgs, idString="", environment=None</i>) + <p> Public method to start a client process. -</p><dl> +</p> +<dl> + <dt><i>interpreter</i> (str)</dt> <dd> interpreter to be used for the client -</dd><dt><i>clientScript</i> (str)</dt> +</dd> +<dt><i>clientScript</i> (str)</dt> <dd> path to the client script -</dd><dt><i>clientArgs</i></dt> +</dd> +<dt><i>clientArgs</i></dt> <dd> list of arguments for the client -</dd><dt><i>idString</i> (str)</dt> +</dd> +<dt><i>idString</i> (str)</dt> <dd> id of the client to be started -</dd><dt><i>environment</i> (dict)</dt> +</dd> +<dt><i>environment</i> (dict)</dt> <dd> dictionary of environment settings to pass </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> flag indicating a successful client start </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> bool </dd> -</dl><a NAME="JsonServer.stopAllClients" ID="JsonServer.stopAllClients"></a> +</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> +</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> +</p> +<dl> + <dt><i>idString</i> (str)</dt> <dd> id of the client to be stopped