|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric5.Utilities.BackgroundClient</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric5.Utilities.BackgroundClient</h1> |
|
23 <p> |
|
24 Module implementing a Qt free version of a background client for the various |
|
25 checkers and other python interpreter dependent functions. |
|
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="#BackgroundClient">BackgroundClient</a></td> |
|
35 <td>Class implementing the main part of the background client.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="BackgroundClient" ID="BackgroundClient"></a> |
|
44 <h2>BackgroundClient</h2> |
|
45 <p> |
|
46 Class implementing the main part of the background client. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 object |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>backgroundClient</td></tr> |
|
53 </table> |
|
54 <h3>Class Methods</h3> |
|
55 <table> |
|
56 <tr><td>None</td></tr> |
|
57 </table> |
|
58 <h3>Methods</h3> |
|
59 <table> |
|
60 <tr> |
|
61 <td><a href="#BackgroundClient.__init__">BackgroundClient</a></td> |
|
62 <td>Constructor of the BackgroundClient class.</td> |
|
63 </tr><tr> |
|
64 <td><a href="#BackgroundClient.__initClientService">__initClientService</a></td> |
|
65 <td>Import the given module and register it as service.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#BackgroundClient.__send">__send</a></td> |
|
68 <td>Private method to send a job response back to the BackgroundService.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#BackgroundClient.__unhandled_exception">__unhandled_exception</a></td> |
|
71 <td>Private method called to report an uncaught exception.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#BackgroundClient.run">run</a></td> |
|
74 <td>Implement the main loop of the client.</td> |
|
75 </tr> |
|
76 </table> |
|
77 <h3>Static Methods</h3> |
|
78 <table> |
|
79 <tr><td>None</td></tr> |
|
80 </table> |
|
81 <a NAME="BackgroundClient.__init__" ID="BackgroundClient.__init__"></a> |
|
82 <h4>BackgroundClient (Constructor)</h4> |
|
83 <b>BackgroundClient</b>(<i>host, port</i>) |
|
84 <p> |
|
85 Constructor of the BackgroundClient class. |
|
86 </p><dl> |
|
87 <dt><i>host</i></dt> |
|
88 <dd> |
|
89 ip address the background service is listening |
|
90 </dd><dt><i>port</i></dt> |
|
91 <dd> |
|
92 port of the background service |
|
93 </dd> |
|
94 </dl><a NAME="BackgroundClient.__initClientService" ID="BackgroundClient.__initClientService"></a> |
|
95 <h4>BackgroundClient.__initClientService</h4> |
|
96 <b>__initClientService</b>(<i>fn, path, module</i>) |
|
97 <p> |
|
98 Import the given module and register it as service. |
|
99 </p><dl> |
|
100 <dt><i>fn</i></dt> |
|
101 <dd> |
|
102 service name to register (str) |
|
103 </dd><dt><i>path</i></dt> |
|
104 <dd> |
|
105 contains the path to the module (str) |
|
106 </dd><dt><i>module</i></dt> |
|
107 <dd> |
|
108 name to import (str) |
|
109 </dd> |
|
110 </dl><dl> |
|
111 <dt>Returns:</dt> |
|
112 <dd> |
|
113 text result of the import action (str) |
|
114 </dd> |
|
115 </dl><a NAME="BackgroundClient.__send" ID="BackgroundClient.__send"></a> |
|
116 <h4>BackgroundClient.__send</h4> |
|
117 <b>__send</b>(<i>fx, fn, data</i>) |
|
118 <p> |
|
119 Private method to send a job response back to the BackgroundService. |
|
120 </p><dl> |
|
121 <dt><i>fx</i></dt> |
|
122 <dd> |
|
123 remote function name to execute (str) |
|
124 </dd><dt><i>fn</i></dt> |
|
125 <dd> |
|
126 filename for identification (str) |
|
127 </dd><dt><i>data</i></dt> |
|
128 <dd> |
|
129 return value(s) (any basic datatype) |
|
130 </dd> |
|
131 </dl><a NAME="BackgroundClient.__unhandled_exception" ID="BackgroundClient.__unhandled_exception"></a> |
|
132 <h4>BackgroundClient.__unhandled_exception</h4> |
|
133 <b>__unhandled_exception</b>(<i>exctype, excval, exctb</i>) |
|
134 <p> |
|
135 Private method called to report an uncaught exception. |
|
136 </p><dl> |
|
137 <dt><i>exctype</i></dt> |
|
138 <dd> |
|
139 the type of the exception |
|
140 </dd><dt><i>excval</i></dt> |
|
141 <dd> |
|
142 data about the exception |
|
143 </dd><dt><i>exctb</i></dt> |
|
144 <dd> |
|
145 traceback for the exception |
|
146 </dd> |
|
147 </dl><a NAME="BackgroundClient.run" ID="BackgroundClient.run"></a> |
|
148 <h4>BackgroundClient.run</h4> |
|
149 <b>run</b>(<i></i>) |
|
150 <p> |
|
151 Implement the main loop of the client. |
|
152 </p> |
|
153 <div align="right"><a href="#top">Up</a></div> |
|
154 <hr /> |
|
155 </body></html> |