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