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