Documentation/Source/eric5.Toolbox.SingleApplication.html

changeset 2087
795992a5c561
child 2367
78f6c8193d37
equal deleted inserted replaced
2085:b4c1f0b6dac2 2087:795992a5c561
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric5.Toolbox.SingleApplication</title>
6 <style>
7 body {
8 background: #EDECE6;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #85774A; }
14 h2 { color: white; background: #85774A; }
15 h3 { color: white; background: #9D936E; }
16 h4 { color: white; background: #9D936E; }
17
18 a { color: #BA6D36; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.Toolbox.SingleApplication</h1>
24 <p>
25 Module implementing the single application server and client.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#SingleApplicationClient">SingleApplicationClient</a></td>
35 <td>Class implementing the single application client base class.</td>
36 </tr><tr>
37 <td><a href="#SingleApplicationServer">SingleApplicationServer</a></td>
38 <td>Class implementing the single application server base class.</td>
39 </tr>
40 </table>
41 <h3>Functions</h3>
42 <table>
43 <tr><td>None</td></tr>
44 </table>
45 <hr /><hr />
46 <a NAME="SingleApplicationClient" ID="SingleApplicationClient"></a>
47 <h2>SingleApplicationClient</h2>
48 <p>
49 Class implementing the single application client base class.
50 </p>
51 <h3>Derived from</h3>
52 object
53 <h3>Class Attributes</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Class Methods</h3>
58 <table>
59 <tr><td>None</td></tr>
60 </table>
61 <h3>Methods</h3>
62 <table>
63 <tr>
64 <td><a href="#SingleApplicationClient.__init__">SingleApplicationClient</a></td>
65 <td>Constructor</td>
66 </tr><tr>
67 <td><a href="#SingleApplicationClient.connect">connect</a></td>
68 <td>Public method to connect the single application client to its server.</td>
69 </tr><tr>
70 <td><a href="#SingleApplicationClient.disconnect">disconnect</a></td>
71 <td>Public method to disconnect from the Single Appliocation server.</td>
72 </tr><tr>
73 <td><a href="#SingleApplicationClient.errstr">errstr</a></td>
74 <td>Public method to return a meaningful error string for the last error.</td>
75 </tr><tr>
76 <td><a href="#SingleApplicationClient.processArgs">processArgs</a></td>
77 <td>Public method to process the command line args passed to the UI.</td>
78 </tr><tr>
79 <td><a href="#SingleApplicationClient.sendCommand">sendCommand</a></td>
80 <td>Public method to send the command to the application server.</td>
81 </tr>
82 </table>
83 <h3>Static Methods</h3>
84 <table>
85 <tr><td>None</td></tr>
86 </table>
87 <a NAME="SingleApplicationClient.__init__" ID="SingleApplicationClient.__init__"></a>
88 <h4>SingleApplicationClient (Constructor)</h4>
89 <b>SingleApplicationClient</b>(<i>name</i>)
90 <p>
91 Constructor
92 </p><dl>
93 <dt><i>name</i></dt>
94 <dd>
95 name of the local server to connect to (string)
96 </dd>
97 </dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a>
98 <h4>SingleApplicationClient.connect</h4>
99 <b>connect</b>(<i></i>)
100 <p>
101 Public method to connect the single application client to its server.
102 </p><dl>
103 <dt>Returns:</dt>
104 <dd>
105 value indicating success or an error number. Value is one of:
106 <table>
107 <tr><td>0</td><td>No application is running</td></tr>
108 <tr><td>1</td><td>Application is already running</td></tr>
109 </table>
110 </dd>
111 </dl><a NAME="SingleApplicationClient.disconnect" ID="SingleApplicationClient.disconnect"></a>
112 <h4>SingleApplicationClient.disconnect</h4>
113 <b>disconnect</b>(<i></i>)
114 <p>
115 Public method to disconnect from the Single Appliocation server.
116 </p><a NAME="SingleApplicationClient.errstr" ID="SingleApplicationClient.errstr"></a>
117 <h4>SingleApplicationClient.errstr</h4>
118 <b>errstr</b>(<i></i>)
119 <p>
120 Public method to return a meaningful error string for the last error.
121 </p><dl>
122 <dt>Returns:</dt>
123 <dd>
124 error string for the last error (string)
125 </dd>
126 </dl><a NAME="SingleApplicationClient.processArgs" ID="SingleApplicationClient.processArgs"></a>
127 <h4>SingleApplicationClient.processArgs</h4>
128 <b>processArgs</b>(<i>args</i>)
129 <p>
130 Public method to process the command line args passed to the UI.
131 </p><p>
132 <b>Note</b>: This method must be overridden by subclasses.
133 </p><dl>
134 <dt><i>args</i></dt>
135 <dd>
136 command line args (list of strings)
137 </dd>
138 </dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a>
139 <h4>SingleApplicationClient.sendCommand</h4>
140 <b>sendCommand</b>(<i>cmd</i>)
141 <p>
142 Public method to send the command to the application server.
143 </p><dl>
144 <dt><i>cmd</i></dt>
145 <dd>
146 command to be sent (string)
147 </dd>
148 </dl>
149 <div align="right"><a href="#top">Up</a></div>
150 <hr /><hr />
151 <a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a>
152 <h2>SingleApplicationServer</h2>
153 <p>
154 Class implementing the single application server base class.
155 </p>
156 <h3>Derived from</h3>
157 QLocalServer
158 <h3>Class Attributes</h3>
159 <table>
160 <tr><td>None</td></tr>
161 </table>
162 <h3>Class Methods</h3>
163 <table>
164 <tr><td>None</td></tr>
165 </table>
166 <h3>Methods</h3>
167 <table>
168 <tr>
169 <td><a href="#SingleApplicationServer.__init__">SingleApplicationServer</a></td>
170 <td>Constructor</td>
171 </tr><tr>
172 <td><a href="#SingleApplicationServer.__disconnected">__disconnected</a></td>
173 <td>Private method to handle the closure of the socket.</td>
174 </tr><tr>
175 <td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td>
176 <td>Private slot to handle a new connection.</td>
177 </tr><tr>
178 <td><a href="#SingleApplicationServer.__parseLine">__parseLine</a></td>
179 <td>Private method to handle data from the client.</td>
180 </tr><tr>
181 <td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td>
182 <td>Public slot to handle the command sent by the client.</td>
183 </tr><tr>
184 <td><a href="#SingleApplicationServer.shutdown">shutdown</a></td>
185 <td>Public method used to shut down the server.</td>
186 </tr>
187 </table>
188 <h3>Static Methods</h3>
189 <table>
190 <tr><td>None</td></tr>
191 </table>
192 <a NAME="SingleApplicationServer.__init__" ID="SingleApplicationServer.__init__"></a>
193 <h4>SingleApplicationServer (Constructor)</h4>
194 <b>SingleApplicationServer</b>(<i>name</i>)
195 <p>
196 Constructor
197 </p><dl>
198 <dt><i>name</i></dt>
199 <dd>
200 name this server is listening to (string)
201 </dd>
202 </dl><a NAME="SingleApplicationServer.__disconnected" ID="SingleApplicationServer.__disconnected"></a>
203 <h4>SingleApplicationServer.__disconnected</h4>
204 <b>__disconnected</b>(<i></i>)
205 <p>
206 Private method to handle the closure of the socket.
207 </p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a>
208 <h4>SingleApplicationServer.__newConnection</h4>
209 <b>__newConnection</b>(<i></i>)
210 <p>
211 Private slot to handle a new connection.
212 </p><a NAME="SingleApplicationServer.__parseLine" ID="SingleApplicationServer.__parseLine"></a>
213 <h4>SingleApplicationServer.__parseLine</h4>
214 <b>__parseLine</b>(<i></i>)
215 <p>
216 Private method to handle data from the client.
217 </p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a>
218 <h4>SingleApplicationServer.handleCommand</h4>
219 <b>handleCommand</b>(<i>cmd, params</i>)
220 <p>
221 Public slot to handle the command sent by the client.
222 </p><p>
223 <b>Note</b>: This method must be overridden by subclasses.
224 </p><dl>
225 <dt><i>cmd</i></dt>
226 <dd>
227 commandstring (string)
228 </dd><dt><i>params</i></dt>
229 <dd>
230 parameterstring (string)
231 </dd>
232 </dl><a NAME="SingleApplicationServer.shutdown" ID="SingleApplicationServer.shutdown"></a>
233 <h4>SingleApplicationServer.shutdown</h4>
234 <b>shutdown</b>(<i></i>)
235 <p>
236 Public method used to shut down the server.
237 </p>
238 <div align="right"><a href="#top">Up</a></div>
239 <hr />
240 </body></html>

eric ide

mercurial