提交 | 用户 | 时间
|
71e81e
|
1 |
package cn.stylefeng.guns.plcserver; |
懒 |
2 |
|
|
3 |
|
|
4 |
import cn.stylefeng.guns.modular.bs.collectionParamConf.service.CollectionParamConfService; |
|
5 |
import cn.stylefeng.guns.modular.bs.equipmentInfo.service.EquipmentInfoService; |
|
6 |
import cn.stylefeng.guns.modular.bs.locationInfo.service.LocationInfoService; |
|
7 |
import cn.stylefeng.guns.modular.cm.paramCollection.service.ParamCollectionService; |
|
8 |
import cn.stylefeng.guns.modular.cm.passingStationCollection.service.PassingStationCollectionService; |
|
9 |
import cn.stylefeng.guns.modular.dq.materialTraceability.service.MaterialTraceabilityService; |
|
10 |
import cn.stylefeng.guns.modular.em.equipmentAlarm.service.EquipmentAlarmService; |
|
11 |
import cn.stylefeng.guns.modular.em.equipmentStatus.service.EquipmentStatusService; |
|
12 |
import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.params.ProductionOrdeInfoParam; |
|
13 |
import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.result.ProductionOrdeInfoResult; |
|
14 |
import cn.stylefeng.guns.modular.om.productionOrdeInfo.service.ProductionOrdeInfoService; |
|
15 |
import cn.stylefeng.guns.modular.sc.repairManageInfo.service.RepairManageInfoService; |
|
16 |
import cn.stylefeng.guns.modular.sc.serialNumbersConf.service.SerialNumbersConfService; |
|
17 |
import cn.stylefeng.guns.plcserver.opc.GlobalVariable; |
|
18 |
import cn.stylefeng.guns.plcserver.opc.OPCComm; |
|
19 |
import cn.stylefeng.guns.plcserver.server.BOP010.BOP010ServerInterface; |
|
20 |
import cn.stylefeng.guns.plcserver.server.BOP010.impl.BOP010ServerInterfaceImpl; |
|
21 |
import cn.stylefeng.guns.plcserver.server.BOP020.BOP020ServerInterface; |
|
22 |
import cn.stylefeng.guns.plcserver.server.BOP020.impl.BOP020ServerInterfaceImpl; |
|
23 |
import cn.stylefeng.guns.plcserver.server.BOP030.BOP030ServerInterface; |
|
24 |
import cn.stylefeng.guns.plcserver.server.BOP030.impl.BOP030ServerInterfaceImpl; |
|
25 |
import cn.stylefeng.guns.plcserver.server.BOP030B.BOP030BServerInterface; |
|
26 |
import cn.stylefeng.guns.plcserver.server.BOP030B.impl.BOP030BServerInterfaceImpl; |
|
27 |
import cn.stylefeng.guns.plcserver.server.BOP040.BOP040ServerInterface; |
|
28 |
import cn.stylefeng.guns.plcserver.server.BOP040.impl.BOP040ServerInterfaceImpl; |
|
29 |
import cn.stylefeng.guns.plcserver.server.BOP040B.BOP040BServerInterface; |
|
30 |
import cn.stylefeng.guns.plcserver.server.BOP040B.impl.BOP040BServerInterfaceImpl; |
|
31 |
import cn.stylefeng.guns.plcserver.server.COP010.COP010ServerInterface; |
|
32 |
import cn.stylefeng.guns.plcserver.server.COP010.impl.COP010ServerInterfaceImpl; |
|
33 |
import cn.stylefeng.guns.plcserver.server.COP020.COP020ServerInterface; |
|
34 |
import cn.stylefeng.guns.plcserver.server.COP020.impl.COP020ServerInterfaceImpl; |
|
35 |
import cn.stylefeng.guns.plcserver.server.COP030.COP030ServerInterface; |
|
36 |
import cn.stylefeng.guns.plcserver.server.COP030.impl.COP030ServerInterfaceImpl; |
|
37 |
import cn.stylefeng.guns.plcserver.server.DOP010.DOP010ServerInterface; |
|
38 |
import cn.stylefeng.guns.plcserver.server.DOP010.impl.DOP010ServerInterfaceImpl; |
|
39 |
import cn.stylefeng.guns.plcserver.server.DOP020.DOP020ServerInterface; |
|
40 |
import cn.stylefeng.guns.plcserver.server.DOP020.impl.DOP020ServerInterfaceImpl; |
|
41 |
import cn.stylefeng.guns.plcserver.server.EOP010.EOP010ServerInterface; |
|
42 |
import cn.stylefeng.guns.plcserver.server.EOP010.impl.EOP010ServerInterfaceImpl; |
|
43 |
import cn.stylefeng.guns.plcserver.server.EOP020.EOP020ServerInterface; |
|
44 |
import cn.stylefeng.guns.plcserver.server.EOP020.impl.EOP020ServerInterfaceImpl; |
|
45 |
import cn.stylefeng.guns.plcserver.server.EOP030.EOP030ServerInterface; |
|
46 |
import cn.stylefeng.guns.plcserver.server.EOP030.impl.EOP030ServerInterfaceImpl; |
|
47 |
import cn.stylefeng.guns.plcserver.server.EOP040.EOP040ServerInterface; |
|
48 |
import cn.stylefeng.guns.plcserver.server.EOP040.impl.EOP040ServerInterfaceImpl; |
|
49 |
import cn.stylefeng.guns.plcserver.server.EOP050.EOP050ServerInterface; |
|
50 |
import cn.stylefeng.guns.plcserver.server.EOP050.impl.EOP050ServerInterfaceImpl; |
|
51 |
import cn.stylefeng.guns.plcserver.server.EOP060.EOP060ServerInterface; |
|
52 |
import cn.stylefeng.guns.plcserver.server.EOP060.impl.EOP060ServerInterfaceImpl; |
|
53 |
import cn.stylefeng.guns.plcserver.server.EOP070.EOP070ServerInterface; |
|
54 |
import cn.stylefeng.guns.plcserver.server.EOP070.impl.EOP070ServerInterfaceImpl; |
|
55 |
import cn.stylefeng.guns.plcserver.server.EOP070B.EOP070BServerInterface; |
|
56 |
import cn.stylefeng.guns.plcserver.server.EOP070B.impl.EOP070BServerInterfaceImpl; |
|
57 |
import cn.stylefeng.guns.plcserver.server.EOP080.EOP080ServerInterface; |
|
58 |
import cn.stylefeng.guns.plcserver.server.EOP080.impl.EOP080ServerInterfaceImpl; |
|
59 |
import cn.stylefeng.guns.plcserver.server.EOP090.EOP090ServerInterface; |
|
60 |
import cn.stylefeng.guns.plcserver.server.EOP090.impl.EOP090ServerInterfaceImpl; |
|
61 |
import cn.stylefeng.guns.plcserver.server.EOP090B.EOP090BServerInterface; |
|
62 |
import cn.stylefeng.guns.plcserver.server.EOP090B.impl.EOP090BServerInterfaceImpl; |
|
63 |
import cn.stylefeng.guns.plcserver.server.OP010.OP010ServerInterface; |
|
64 |
import cn.stylefeng.guns.plcserver.server.OP010.impl.OP010ServerInterfaceImpl; |
|
65 |
import cn.stylefeng.guns.plcserver.server.OP020.OP020ServerInterface; |
|
66 |
import cn.stylefeng.guns.plcserver.server.OP020.impl.OP020ServerInterfaceImpl; |
|
67 |
import cn.stylefeng.guns.plcserver.server.OP030.OP030ServerInterface; |
|
68 |
import cn.stylefeng.guns.plcserver.server.OP030.impl.OP030ServerInterfaceImpl; |
|
69 |
import cn.stylefeng.guns.plcserver.server.OP040.OP040ServerInterface; |
|
70 |
import cn.stylefeng.guns.plcserver.server.OP040.impl.OP040ServerInterfaceImpl; |
|
71 |
import cn.stylefeng.guns.plcserver.server.OP050.OP050ServerInterface; |
|
72 |
import cn.stylefeng.guns.plcserver.server.OP050.impl.OP050ServerInterfaceImpl; |
|
73 |
import cn.stylefeng.guns.plcserver.server.OP070.OP070ServerInterface; |
|
74 |
import cn.stylefeng.guns.plcserver.server.OP070.impl.OP070ServerInterfaceImpl; |
|
75 |
import cn.stylefeng.guns.plcserver.server.OP080.OP080ServerInterface; |
|
76 |
import cn.stylefeng.guns.plcserver.server.OP080.impl.OP080ServerInterfaceImpl; |
|
77 |
import cn.stylefeng.guns.plcserver.server.OP090.OP090ServerInterface; |
|
78 |
import cn.stylefeng.guns.plcserver.server.OP090.impl.OP090ServerInterfaceImpl; |
|
79 |
import cn.stylefeng.guns.plcserver.server.OP100.OP100ServerInterface; |
|
80 |
import cn.stylefeng.guns.plcserver.server.OP100.impl.OP100ServerInterfaceImpl; |
|
81 |
import cn.stylefeng.guns.plcserver.server.OP110.OP110ServerInterface; |
|
82 |
import cn.stylefeng.guns.plcserver.server.OP110.impl.OP110ServerInterfaceImpl; |
|
83 |
import cn.stylefeng.guns.plcserver.server.OP120.OP120ServerInterface; |
|
84 |
import cn.stylefeng.guns.plcserver.server.OP120.impl.OP120ServerInterfaceImpl; |
|
85 |
import cn.stylefeng.guns.plcserver.server.OP120B.OP120BServerInterface; |
|
86 |
import cn.stylefeng.guns.plcserver.server.OP120B.impl.OP120BServerInterfaceImpl; |
|
87 |
import cn.stylefeng.guns.plcserver.server.OP130.OP130ServerInterface; |
|
88 |
import cn.stylefeng.guns.plcserver.server.OP130.impl.OP130ServerInterfaceImpl; |
|
89 |
import cn.stylefeng.guns.plcserver.server.OP130B.OP130BServerInterface; |
|
90 |
import cn.stylefeng.guns.plcserver.server.OP130B.impl.OP130BServerInterfaceImpl; |
|
91 |
import cn.stylefeng.guns.plcserver.server.OP140.OP140ServerInterface; |
|
92 |
import cn.stylefeng.guns.plcserver.server.OP140.impl.OP140ServerInterfaceImpl; |
|
93 |
import cn.stylefeng.guns.plcserver.server.OP150.OP150ServerInterface; |
|
94 |
import cn.stylefeng.guns.plcserver.server.OP150.impl.OP150ServerInterfaceImpl; |
|
95 |
import cn.stylefeng.guns.plcserver.server.OP160.OP160ServerInterface; |
|
96 |
import cn.stylefeng.guns.plcserver.server.OP160.impl.OP160ServerInterfaceImpl; |
|
97 |
import cn.stylefeng.guns.plcserver.server.OP170.OP170ServerInterface; |
|
98 |
import cn.stylefeng.guns.plcserver.server.OP170.impl.OP170ServerInterfaceImpl; |
|
99 |
import cn.stylefeng.guns.plcserver.server.state.StateServerInterface; |
|
100 |
import cn.stylefeng.guns.plcserver.server.state.impl.StateServerInterfaceImpl; |
|
101 |
import org.springframework.beans.factory.annotation.Autowired; |
|
102 |
import org.springframework.boot.CommandLineRunner; |
|
103 |
import org.springframework.core.annotation.Order; |
|
104 |
import org.springframework.stereotype.Component; |
|
105 |
|
|
106 |
import java.util.HashMap; |
|
107 |
import java.util.List; |
|
108 |
import java.util.Map; |
|
109 |
import java.util.concurrent.ExecutorService; |
|
110 |
import java.util.concurrent.Executors; |
|
111 |
|
|
112 |
@Component |
|
113 |
@Order(1) |
|
114 |
public class OpcServiceMain implements CommandLineRunner { |
|
115 |
private OPCComm opc = OPCComm.getInstance(); |
|
116 |
|
|
117 |
@Autowired |
|
118 |
public ProductionOrdeInfoService productionOrdeInfoService; |
|
119 |
@Autowired |
|
120 |
public PassingStationCollectionService passingStationCollectionService; |
|
121 |
@Autowired |
|
122 |
public ParamCollectionService paramCollectionService; |
|
123 |
@Autowired |
|
124 |
public CollectionParamConfService collectionParamConfService; |
|
125 |
@Autowired |
|
126 |
public SerialNumbersConfService serialNumbersConfService; |
|
127 |
@Autowired |
|
128 |
private EquipmentStatusService equipmentStatusService; |
|
129 |
|
|
130 |
@Autowired |
|
131 |
private EquipmentAlarmService equipmentAlarmService; |
|
132 |
@Autowired |
|
133 |
private MaterialTraceabilityService materialTraceabilityService; |
|
134 |
@Autowired |
|
135 |
private EquipmentInfoService equipmentInfoService; |
|
136 |
@Autowired |
|
137 |
private RepairManageInfoService repairManageInfoService; |
|
138 |
|
|
139 |
@Autowired |
|
140 |
private LocationInfoService locationInfoService; |
|
141 |
|
|
142 |
@Override |
|
143 |
public void run(String... args) throws Exception { |
|
144 |
if(GlobalVariable.TERMINATED) { |
|
145 |
opc.init(productionOrdeInfoService,passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
146 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
147 |
repairManageInfoService,locationInfoService); |
|
148 |
|
|
149 |
GlobalVariable.PRODUCT_TYPE_MAP.put("191.220001-01","1"); |
|
150 |
GlobalVariable.PRODUCT_TYPE_MAP.put("191.220003-01","2"); |
|
151 |
GlobalVariable.PRODUCT_TYPE_MAP.put("191.220002-01","3"); |
|
152 |
GlobalVariable.PRODUCT_TYPE_MAP.put("191.220004-01","4"); |
|
153 |
|
|
154 |
GlobalVariable.PRODUCT_CODE_MAP.put("1","191.220001-01"); |
|
155 |
GlobalVariable.PRODUCT_CODE_MAP.put("2","191.220003-01"); |
|
156 |
GlobalVariable.PRODUCT_CODE_MAP.put("3","191.220002-01"); |
|
157 |
GlobalVariable.PRODUCT_CODE_MAP.put("4","191.220004-01"); |
|
158 |
|
|
159 |
ExecutorService cachedThreadPool = Executors.newCachedThreadPool(); |
|
160 |
cachedThreadPool.execute(new OP010TaskThreadPool()); |
|
161 |
cachedThreadPool.execute(new OP020TaskThreadPool()); |
|
162 |
cachedThreadPool.execute(new OP030TaskThreadPool()); |
|
163 |
cachedThreadPool.execute(new OP040TaskThreadPool()); |
|
164 |
cachedThreadPool.execute(new OP050TaskThreadPool()); |
|
165 |
cachedThreadPool.execute(new OP070TaskThreadPool()); |
|
166 |
cachedThreadPool.execute(new OP080TaskThreadPool()); |
|
167 |
cachedThreadPool.execute(new OP090TaskThreadPool()); |
|
168 |
cachedThreadPool.execute(new OP100TaskThreadPool()); |
|
169 |
cachedThreadPool.execute(new OP110TaskThreadPool()); |
|
170 |
/* cachedThreadPool.execute(new OP120TaskThreadPool()); |
|
171 |
cachedThreadPool.execute(new OP120BTaskThreadPool());*/ |
|
172 |
cachedThreadPool.execute(new OP130TaskThreadPool()); |
|
173 |
cachedThreadPool.execute(new OP130BTaskThreadPool()); |
|
174 |
cachedThreadPool.execute(new OP140TaskThreadPool()); |
|
175 |
/* cachedThreadPool.execute(new OP150TaskThreadPool());*/ |
|
176 |
cachedThreadPool.execute(new OP160TaskThreadPool()); |
|
177 |
cachedThreadPool.execute(new OP170TaskThreadPool()); |
|
178 |
|
|
179 |
//COP |
|
180 |
cachedThreadPool.execute(new COP010TaskThreadPool()); |
|
181 |
cachedThreadPool.execute(new COP020TaskThreadPool()); |
|
182 |
cachedThreadPool.execute(new COP030TaskThreadPool()); |
|
183 |
|
|
184 |
//BOP |
|
185 |
cachedThreadPool.execute(new BOP010TaskThreadPool()); |
|
186 |
cachedThreadPool.execute(new BOP020TaskThreadPool()); |
|
187 |
cachedThreadPool.execute(new BOP030TaskThreadPool()); |
|
188 |
cachedThreadPool.execute(new BOP030BTaskThreadPool()); |
|
189 |
cachedThreadPool.execute(new BOP040TaskThreadPool()); |
|
190 |
cachedThreadPool.execute(new BOP040BTaskThreadPool()); |
|
191 |
|
|
192 |
//DOP |
|
193 |
cachedThreadPool.execute(new DOP010TaskThreadPool()); |
|
194 |
cachedThreadPool.execute(new DOP020TaskThreadPool()); |
|
195 |
|
|
196 |
//EOP |
|
197 |
cachedThreadPool.execute(new EOP010TaskThreadPool()); |
|
198 |
cachedThreadPool.execute(new EOP020TaskThreadPool()); |
|
199 |
cachedThreadPool.execute(new EOP030TaskThreadPool()); |
|
200 |
cachedThreadPool.execute(new EOP040TaskThreadPool()); |
|
201 |
cachedThreadPool.execute(new EOP050TaskThreadPool()); |
|
202 |
cachedThreadPool.execute(new EOP060TaskThreadPool()); |
|
203 |
cachedThreadPool.execute(new EOP070TaskThreadPool()); |
|
204 |
//cachedThreadPool.execute(new EOP070BTaskThreadPool()); |
|
205 |
|
|
206 |
cachedThreadPool.execute(new EOP080TaskThreadPool()); |
|
207 |
cachedThreadPool.execute(new EOP090TaskThreadPool()); |
|
208 |
cachedThreadPool.execute(new EOP090BTaskThreadPool()); |
|
209 |
|
|
210 |
cachedThreadPool.execute(new StateTaskThreadPool()); |
|
211 |
} |
|
212 |
} |
|
213 |
|
|
214 |
} |
|
215 |
|
|
216 |
class OP010TaskThreadPool implements Runnable { |
|
217 |
|
|
218 |
private OP010ServerInterface server; |
|
219 |
|
|
220 |
public void run() { |
|
221 |
try { |
|
222 |
while (GlobalVariable.TERMINATED) { |
|
223 |
server = new OP010ServerInterfaceImpl(); |
|
224 |
server.monitor(); |
|
225 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
226 |
} |
|
227 |
}catch(Exception e){ |
|
228 |
e.printStackTrace(); |
|
229 |
} |
|
230 |
} |
|
231 |
} |
|
232 |
|
|
233 |
class OP020TaskThreadPool implements Runnable { |
|
234 |
|
|
235 |
private OP020ServerInterface server; |
|
236 |
|
|
237 |
public void run() { |
|
238 |
try { |
|
239 |
while (GlobalVariable.TERMINATED) { |
|
240 |
server = new OP020ServerInterfaceImpl(); |
|
241 |
server.monitor(); |
|
242 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
243 |
} |
|
244 |
}catch(Exception e){ |
|
245 |
e.printStackTrace(); |
|
246 |
} |
|
247 |
} |
|
248 |
} |
|
249 |
|
|
250 |
|
|
251 |
class OP030TaskThreadPool implements Runnable { |
|
252 |
|
|
253 |
private OP030ServerInterface server; |
|
254 |
|
|
255 |
public void run() { |
|
256 |
try { |
|
257 |
while (GlobalVariable.TERMINATED) { |
|
258 |
server = new OP030ServerInterfaceImpl(); |
|
259 |
server.monitor(); |
|
260 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
261 |
} |
|
262 |
}catch(Exception e){ |
|
263 |
e.printStackTrace(); |
|
264 |
} |
|
265 |
} |
|
266 |
} |
|
267 |
|
|
268 |
class OP040TaskThreadPool implements Runnable { |
|
269 |
|
|
270 |
private OP040ServerInterface server; |
|
271 |
|
|
272 |
public void run() { |
|
273 |
try { |
|
274 |
while (GlobalVariable.TERMINATED) { |
|
275 |
server = new OP040ServerInterfaceImpl(); |
|
276 |
server.monitor(); |
|
277 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
278 |
} |
|
279 |
}catch(Exception e){ |
|
280 |
e.printStackTrace(); |
|
281 |
} |
|
282 |
} |
|
283 |
} |
|
284 |
|
|
285 |
class OP050TaskThreadPool implements Runnable { |
|
286 |
|
|
287 |
private OP050ServerInterface server; |
|
288 |
|
|
289 |
public void run() { |
|
290 |
try { |
|
291 |
while (GlobalVariable.TERMINATED) { |
|
292 |
server = new OP050ServerInterfaceImpl(); |
|
293 |
server.monitor(); |
|
294 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
295 |
} |
|
296 |
}catch(Exception e){ |
|
297 |
e.printStackTrace(); |
|
298 |
} |
|
299 |
} |
|
300 |
} |
|
301 |
|
|
302 |
class OP070TaskThreadPool implements Runnable { |
|
303 |
|
|
304 |
private OP070ServerInterface server; |
|
305 |
|
|
306 |
public void run() { |
|
307 |
try { |
|
308 |
while (GlobalVariable.TERMINATED) { |
|
309 |
server = new OP070ServerInterfaceImpl(); |
|
310 |
server.monitor(); |
|
311 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
312 |
} |
|
313 |
}catch(Exception e){ |
|
314 |
e.printStackTrace(); |
|
315 |
} |
|
316 |
} |
|
317 |
} |
|
318 |
|
|
319 |
class OP080TaskThreadPool implements Runnable { |
|
320 |
|
|
321 |
private OP080ServerInterface server; |
|
322 |
|
|
323 |
public void run() { |
|
324 |
try { |
|
325 |
while (GlobalVariable.TERMINATED) { |
|
326 |
server = new OP080ServerInterfaceImpl(); |
|
327 |
server.monitor(); |
|
328 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
329 |
} |
|
330 |
}catch(Exception e){ |
|
331 |
e.printStackTrace(); |
|
332 |
} |
|
333 |
} |
|
334 |
} |
|
335 |
|
|
336 |
class OP090TaskThreadPool implements Runnable { |
|
337 |
|
|
338 |
private OP090ServerInterface server; |
|
339 |
|
|
340 |
public void run() { |
|
341 |
try { |
|
342 |
while (GlobalVariable.TERMINATED) { |
|
343 |
server = new OP090ServerInterfaceImpl(); |
|
344 |
server.monitor(); |
|
345 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
346 |
} |
|
347 |
}catch(Exception e){ |
|
348 |
e.printStackTrace(); |
|
349 |
} |
|
350 |
} |
|
351 |
} |
|
352 |
|
|
353 |
class OP100TaskThreadPool implements Runnable { |
|
354 |
|
|
355 |
private OP100ServerInterface server; |
|
356 |
|
|
357 |
public void run() { |
|
358 |
try { |
|
359 |
while (GlobalVariable.TERMINATED) { |
|
360 |
server = new OP100ServerInterfaceImpl(); |
|
361 |
server.monitor(); |
|
362 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
363 |
} |
|
364 |
}catch(Exception e){ |
|
365 |
e.printStackTrace(); |
|
366 |
} |
|
367 |
} |
|
368 |
} |
|
369 |
|
|
370 |
class OP110TaskThreadPool implements Runnable { |
|
371 |
|
|
372 |
private OP110ServerInterface server; |
|
373 |
|
|
374 |
public void run() { |
|
375 |
try { |
|
376 |
while (GlobalVariable.TERMINATED) { |
|
377 |
server = new OP110ServerInterfaceImpl(); |
|
378 |
server.monitor(); |
|
379 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
380 |
} |
|
381 |
}catch(Exception e){ |
|
382 |
e.printStackTrace(); |
|
383 |
} |
|
384 |
} |
|
385 |
} |
|
386 |
class OP120TaskThreadPool implements Runnable { |
|
387 |
|
|
388 |
private OP120ServerInterface server; |
|
389 |
|
|
390 |
public void run() { |
|
391 |
try { |
|
392 |
while (GlobalVariable.TERMINATED) { |
|
393 |
server = new OP120ServerInterfaceImpl(); |
|
394 |
server.monitor(); |
|
395 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
396 |
} |
|
397 |
}catch(Exception e){ |
|
398 |
e.printStackTrace(); |
|
399 |
} |
|
400 |
} |
|
401 |
} |
|
402 |
class OP120BTaskThreadPool implements Runnable { |
|
403 |
|
|
404 |
private OP120BServerInterface server; |
|
405 |
|
|
406 |
public void run() { |
|
407 |
try { |
|
408 |
while (GlobalVariable.TERMINATED) { |
|
409 |
server = new OP120BServerInterfaceImpl(); |
|
410 |
server.monitor(); |
|
411 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
412 |
} |
|
413 |
}catch(Exception e){ |
|
414 |
e.printStackTrace(); |
|
415 |
} |
|
416 |
} |
|
417 |
} |
|
418 |
|
|
419 |
class OP130TaskThreadPool implements Runnable { |
|
420 |
|
|
421 |
private OP130ServerInterface server; |
|
422 |
|
|
423 |
public void run() { |
|
424 |
try { |
|
425 |
while (GlobalVariable.TERMINATED) { |
|
426 |
server = new OP130ServerInterfaceImpl(); |
|
427 |
server.monitor(); |
|
428 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
429 |
} |
|
430 |
}catch(Exception e){ |
|
431 |
e.printStackTrace(); |
|
432 |
} |
|
433 |
} |
|
434 |
} |
|
435 |
|
|
436 |
class OP130BTaskThreadPool implements Runnable { |
|
437 |
|
|
438 |
private OP130BServerInterface server; |
|
439 |
|
|
440 |
public void run() { |
|
441 |
try { |
|
442 |
while (GlobalVariable.TERMINATED) { |
|
443 |
server = new OP130BServerInterfaceImpl(); |
|
444 |
server.monitor(); |
|
445 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
446 |
} |
|
447 |
}catch(Exception e){ |
|
448 |
e.printStackTrace(); |
|
449 |
} |
|
450 |
} |
|
451 |
} |
|
452 |
|
|
453 |
class OP140TaskThreadPool implements Runnable { |
|
454 |
|
|
455 |
private OP140ServerInterface server; |
|
456 |
|
|
457 |
public void run() { |
|
458 |
try { |
|
459 |
while (GlobalVariable.TERMINATED) { |
|
460 |
server = new OP140ServerInterfaceImpl(); |
|
461 |
server.monitor(); |
|
462 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
463 |
} |
|
464 |
}catch(Exception e){ |
|
465 |
e.printStackTrace(); |
|
466 |
} |
|
467 |
} |
|
468 |
} |
|
469 |
|
|
470 |
class OP150TaskThreadPool implements Runnable { |
|
471 |
|
|
472 |
private OP150ServerInterface server; |
|
473 |
|
|
474 |
public void run() { |
|
475 |
try { |
|
476 |
while (GlobalVariable.TERMINATED) { |
|
477 |
server = new OP150ServerInterfaceImpl(); |
|
478 |
server.monitor(); |
|
479 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
480 |
} |
|
481 |
}catch(Exception e){ |
|
482 |
e.printStackTrace(); |
|
483 |
} |
|
484 |
} |
|
485 |
} |
|
486 |
|
|
487 |
class OP160TaskThreadPool implements Runnable { |
|
488 |
|
|
489 |
private OP160ServerInterface server; |
|
490 |
|
|
491 |
public void run() { |
|
492 |
try { |
|
493 |
while (GlobalVariable.TERMINATED) { |
|
494 |
server = new OP160ServerInterfaceImpl(); |
|
495 |
server.monitor(); |
|
496 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
497 |
} |
|
498 |
}catch(Exception e){ |
|
499 |
e.printStackTrace(); |
|
500 |
} |
|
501 |
} |
|
502 |
} |
|
503 |
|
|
504 |
class OP170TaskThreadPool implements Runnable { |
|
505 |
|
|
506 |
private OP170ServerInterface server; |
|
507 |
|
|
508 |
public void run() { |
|
509 |
try { |
|
510 |
while (GlobalVariable.TERMINATED) { |
|
511 |
server = new OP170ServerInterfaceImpl(); |
|
512 |
server.monitor(); |
|
513 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
514 |
} |
|
515 |
}catch(Exception e){ |
|
516 |
e.printStackTrace(); |
|
517 |
} |
|
518 |
} |
|
519 |
} |
|
520 |
|
|
521 |
|
|
522 |
class COP010TaskThreadPool implements Runnable { |
|
523 |
|
|
524 |
private COP010ServerInterface server; |
|
525 |
|
|
526 |
public void run() { |
|
527 |
try { |
|
528 |
while (GlobalVariable.TERMINATED) { |
|
529 |
server = new COP010ServerInterfaceImpl(); |
|
530 |
server.monitor(); |
|
531 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
532 |
} |
|
533 |
}catch(Exception e){ |
|
534 |
e.printStackTrace(); |
|
535 |
} |
|
536 |
} |
|
537 |
}class COP020TaskThreadPool implements Runnable { |
|
538 |
|
|
539 |
private COP020ServerInterface server; |
|
540 |
|
|
541 |
public void run() { |
|
542 |
try { |
|
543 |
while (GlobalVariable.TERMINATED) { |
|
544 |
server = new COP020ServerInterfaceImpl(); |
|
545 |
server.monitor(); |
|
546 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
547 |
} |
|
548 |
}catch(Exception e){ |
|
549 |
e.printStackTrace(); |
|
550 |
} |
|
551 |
} |
|
552 |
} |
|
553 |
|
|
554 |
class COP030TaskThreadPool implements Runnable { |
|
555 |
|
|
556 |
private COP030ServerInterface server; |
|
557 |
|
|
558 |
public void run() { |
|
559 |
try { |
|
560 |
while (GlobalVariable.TERMINATED) { |
|
561 |
server = new COP030ServerInterfaceImpl(); |
|
562 |
server.monitor(); |
|
563 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
564 |
} |
|
565 |
}catch(Exception e){ |
|
566 |
e.printStackTrace(); |
|
567 |
} |
|
568 |
} |
|
569 |
} |
|
570 |
|
|
571 |
class BOP010TaskThreadPool implements Runnable { |
|
572 |
|
|
573 |
private BOP010ServerInterface server; |
|
574 |
|
|
575 |
public void run() { |
|
576 |
try { |
|
577 |
while (GlobalVariable.TERMINATED) { |
|
578 |
server = new BOP010ServerInterfaceImpl(); |
|
579 |
server.monitor(); |
|
580 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
581 |
} |
|
582 |
}catch(Exception e){ |
|
583 |
e.printStackTrace(); |
|
584 |
} |
|
585 |
} |
|
586 |
} |
|
587 |
|
|
588 |
class BOP020TaskThreadPool implements Runnable { |
|
589 |
|
|
590 |
private BOP020ServerInterface server; |
|
591 |
|
|
592 |
public void run() { |
|
593 |
try { |
|
594 |
while (GlobalVariable.TERMINATED) { |
|
595 |
server = new BOP020ServerInterfaceImpl(); |
|
596 |
server.monitor(); |
|
597 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
598 |
} |
|
599 |
}catch(Exception e){ |
|
600 |
e.printStackTrace(); |
|
601 |
} |
|
602 |
} |
|
603 |
} |
|
604 |
|
|
605 |
class BOP030TaskThreadPool implements Runnable { |
|
606 |
|
|
607 |
private BOP030ServerInterface server; |
|
608 |
|
|
609 |
public void run() { |
|
610 |
try { |
|
611 |
while (GlobalVariable.TERMINATED) { |
|
612 |
server = new BOP030ServerInterfaceImpl(); |
|
613 |
server.monitor(); |
|
614 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
615 |
} |
|
616 |
}catch(Exception e){ |
|
617 |
e.printStackTrace(); |
|
618 |
} |
|
619 |
} |
|
620 |
} |
|
621 |
|
|
622 |
class BOP030BTaskThreadPool implements Runnable { |
|
623 |
|
|
624 |
private BOP030BServerInterface server; |
|
625 |
|
|
626 |
public void run() { |
|
627 |
try { |
|
628 |
while (GlobalVariable.TERMINATED) { |
|
629 |
server = new BOP030BServerInterfaceImpl(); |
|
630 |
server.monitor(); |
|
631 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
632 |
} |
|
633 |
}catch(Exception e){ |
|
634 |
e.printStackTrace(); |
|
635 |
} |
|
636 |
} |
|
637 |
} |
|
638 |
|
|
639 |
class BOP040TaskThreadPool implements Runnable { |
|
640 |
|
|
641 |
private BOP040ServerInterface server; |
|
642 |
|
|
643 |
public void run() { |
|
644 |
try { |
|
645 |
while (GlobalVariable.TERMINATED) { |
|
646 |
server = new BOP040ServerInterfaceImpl(); |
|
647 |
server.monitor(); |
|
648 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
649 |
} |
|
650 |
}catch(Exception e){ |
|
651 |
e.printStackTrace(); |
|
652 |
} |
|
653 |
} |
|
654 |
} |
|
655 |
|
|
656 |
class BOP040BTaskThreadPool implements Runnable { |
|
657 |
|
|
658 |
private BOP040BServerInterface server; |
|
659 |
|
|
660 |
public void run() { |
|
661 |
try { |
|
662 |
while (GlobalVariable.TERMINATED) { |
|
663 |
server = new BOP040BServerInterfaceImpl(); |
|
664 |
server.monitor(); |
|
665 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
666 |
} |
|
667 |
}catch(Exception e){ |
|
668 |
e.printStackTrace(); |
|
669 |
} |
|
670 |
} |
|
671 |
} |
|
672 |
|
|
673 |
//EOP |
|
674 |
class EOP010TaskThreadPool implements Runnable { |
|
675 |
|
|
676 |
private EOP010ServerInterface server; |
|
677 |
|
|
678 |
public void run() { |
|
679 |
try { |
|
680 |
while (GlobalVariable.TERMINATED) { |
|
681 |
server = new EOP010ServerInterfaceImpl(); |
|
682 |
server.monitor(); |
|
683 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
684 |
} |
|
685 |
}catch(Exception e){ |
|
686 |
e.printStackTrace(); |
|
687 |
} |
|
688 |
} |
|
689 |
} |
|
690 |
class EOP020TaskThreadPool implements Runnable { |
|
691 |
|
|
692 |
private EOP020ServerInterface server; |
|
693 |
|
|
694 |
public void run() { |
|
695 |
try { |
|
696 |
while (GlobalVariable.TERMINATED) { |
|
697 |
server = new EOP020ServerInterfaceImpl(); |
|
698 |
server.monitor(); |
|
699 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
700 |
} |
|
701 |
}catch(Exception e){ |
|
702 |
e.printStackTrace(); |
|
703 |
} |
|
704 |
} |
|
705 |
} |
|
706 |
|
|
707 |
class EOP030TaskThreadPool implements Runnable { |
|
708 |
|
|
709 |
private EOP030ServerInterface server; |
|
710 |
|
|
711 |
public void run() { |
|
712 |
try { |
|
713 |
while (GlobalVariable.TERMINATED) { |
|
714 |
server = new EOP030ServerInterfaceImpl(); |
|
715 |
server.monitor(); |
|
716 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
717 |
} |
|
718 |
}catch(Exception e){ |
|
719 |
e.printStackTrace(); |
|
720 |
} |
|
721 |
} |
|
722 |
} |
|
723 |
class EOP040TaskThreadPool implements Runnable { |
|
724 |
|
|
725 |
private EOP040ServerInterface server; |
|
726 |
|
|
727 |
public void run() { |
|
728 |
try { |
|
729 |
while (GlobalVariable.TERMINATED) { |
|
730 |
server = new EOP040ServerInterfaceImpl(); |
|
731 |
server.monitor(); |
|
732 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
733 |
} |
|
734 |
}catch(Exception e){ |
|
735 |
e.printStackTrace(); |
|
736 |
} |
|
737 |
} |
|
738 |
} |
|
739 |
class EOP050TaskThreadPool implements Runnable { |
|
740 |
|
|
741 |
private EOP050ServerInterface server; |
|
742 |
|
|
743 |
public void run() { |
|
744 |
try { |
|
745 |
while (GlobalVariable.TERMINATED) { |
|
746 |
server = new EOP050ServerInterfaceImpl(); |
|
747 |
server.monitor(); |
|
748 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
749 |
} |
|
750 |
}catch(Exception e){ |
|
751 |
e.printStackTrace(); |
|
752 |
} |
|
753 |
} |
|
754 |
} |
|
755 |
|
|
756 |
class EOP060TaskThreadPool implements Runnable { |
|
757 |
|
|
758 |
private EOP060ServerInterface server; |
|
759 |
|
|
760 |
public void run() { |
|
761 |
try { |
|
762 |
while (GlobalVariable.TERMINATED) { |
|
763 |
server = new EOP060ServerInterfaceImpl(); |
|
764 |
server.monitor(); |
|
765 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
766 |
} |
|
767 |
}catch(Exception e){ |
|
768 |
e.printStackTrace(); |
|
769 |
} |
|
770 |
} |
|
771 |
} |
|
772 |
|
|
773 |
class EOP070TaskThreadPool implements Runnable { |
|
774 |
|
|
775 |
private EOP070ServerInterface server; |
|
776 |
|
|
777 |
public void run() { |
|
778 |
try { |
|
779 |
while (GlobalVariable.TERMINATED) { |
|
780 |
server = new EOP070ServerInterfaceImpl(); |
|
781 |
server.monitor(); |
|
782 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
783 |
} |
|
784 |
}catch(Exception e){ |
|
785 |
e.printStackTrace(); |
|
786 |
} |
|
787 |
} |
|
788 |
} |
|
789 |
|
|
790 |
class EOP070BTaskThreadPool implements Runnable { |
|
791 |
|
|
792 |
private EOP070BServerInterface server; |
|
793 |
|
|
794 |
public void run() { |
|
795 |
try { |
|
796 |
while (GlobalVariable.TERMINATED) { |
|
797 |
server = new EOP070BServerInterfaceImpl(); |
|
798 |
server.monitor(); |
|
799 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
800 |
} |
|
801 |
}catch(Exception e){ |
|
802 |
e.printStackTrace(); |
|
803 |
} |
|
804 |
} |
|
805 |
} |
|
806 |
|
|
807 |
class EOP080TaskThreadPool implements Runnable { |
|
808 |
|
|
809 |
private EOP080ServerInterface server; |
|
810 |
|
|
811 |
public void run() { |
|
812 |
try { |
|
813 |
while (GlobalVariable.TERMINATED) { |
|
814 |
server = new EOP080ServerInterfaceImpl(); |
|
815 |
server.monitor(); |
|
816 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
817 |
} |
|
818 |
}catch(Exception e){ |
|
819 |
e.printStackTrace(); |
|
820 |
} |
|
821 |
} |
|
822 |
} |
|
823 |
|
|
824 |
class EOP090TaskThreadPool implements Runnable { |
|
825 |
|
|
826 |
private EOP090ServerInterface server; |
|
827 |
|
|
828 |
public void run() { |
|
829 |
try { |
|
830 |
while (GlobalVariable.TERMINATED) { |
|
831 |
server = new EOP090ServerInterfaceImpl(); |
|
832 |
server.monitor(); |
|
833 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
834 |
} |
|
835 |
}catch(Exception e){ |
|
836 |
e.printStackTrace(); |
|
837 |
} |
|
838 |
} |
|
839 |
} |
|
840 |
|
|
841 |
class EOP090BTaskThreadPool implements Runnable { |
|
842 |
|
|
843 |
private EOP090BServerInterface server; |
|
844 |
|
|
845 |
public void run() { |
|
846 |
try { |
|
847 |
while (GlobalVariable.TERMINATED) { |
|
848 |
server = new EOP090BServerInterfaceImpl(); |
|
849 |
server.monitor(); |
|
850 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
851 |
} |
|
852 |
}catch(Exception e){ |
|
853 |
e.printStackTrace(); |
|
854 |
} |
|
855 |
} |
|
856 |
} |
|
857 |
|
|
858 |
class DOP010TaskThreadPool implements Runnable { |
|
859 |
|
|
860 |
private DOP010ServerInterface server; |
|
861 |
|
|
862 |
public void run() { |
|
863 |
try { |
|
864 |
while (GlobalVariable.TERMINATED) { |
|
865 |
server = new DOP010ServerInterfaceImpl(); |
|
866 |
server.monitor(); |
|
867 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
868 |
} |
|
869 |
}catch(Exception e){ |
|
870 |
e.printStackTrace(); |
|
871 |
} |
|
872 |
} |
|
873 |
} |
|
874 |
|
|
875 |
class DOP020TaskThreadPool implements Runnable { |
|
876 |
|
|
877 |
private DOP020ServerInterface server; |
|
878 |
|
|
879 |
public void run() { |
|
880 |
try { |
|
881 |
while (GlobalVariable.TERMINATED) { |
|
882 |
server = new DOP020ServerInterfaceImpl(); |
|
883 |
server.monitor(); |
|
884 |
Thread.sleep(GlobalVariable.SLEEP_TIME); |
|
885 |
} |
|
886 |
}catch(Exception e){ |
|
887 |
e.printStackTrace(); |
|
888 |
} |
|
889 |
} |
|
890 |
} |
|
891 |
|
|
892 |
class StateTaskThreadPool implements Runnable { |
|
893 |
|
|
894 |
private StateServerInterface server; |
|
895 |
|
|
896 |
public void run() { |
|
897 |
try { |
|
898 |
while (GlobalVariable.TERMINATED) { |
|
899 |
server = new StateServerInterfaceImpl(); |
|
900 |
server.monitor(); |
|
901 |
Thread.sleep(30*1000); |
|
902 |
} |
|
903 |
}catch(Exception e){ |
|
904 |
e.printStackTrace(); |
|
905 |
} |
|
906 |
} |
|
907 |
} |