package cn.stylefeng.guns.plcserver; import cn.stylefeng.guns.modular.bs.collectionParamConf.service.CollectionParamConfService; import cn.stylefeng.guns.modular.bs.equipmentInfo.service.EquipmentInfoService; import cn.stylefeng.guns.modular.bs.locationInfo.service.LocationInfoService; import cn.stylefeng.guns.modular.cm.paramCollection.service.ParamCollectionService; import cn.stylefeng.guns.modular.cm.passingStationCollection.service.PassingStationCollectionService; import cn.stylefeng.guns.modular.dq.materialTraceability.service.MaterialTraceabilityService; import cn.stylefeng.guns.modular.em.equipmentAlarm.service.EquipmentAlarmService; import cn.stylefeng.guns.modular.em.equipmentStatus.service.EquipmentStatusService; import cn.stylefeng.guns.modular.gm.greaseManage.service.GreaseManageService; import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.params.ProductionOrdeInfoParam; import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.result.ProductionOrdeInfoResult; import cn.stylefeng.guns.modular.om.productionOrdeInfo.service.ProductionOrdeInfoService; import cn.stylefeng.guns.modular.om.productionOrderBatchInfo.service.ProductionOrderBatchInfoService; import cn.stylefeng.guns.modular.om.productionOrderRecords.service.ProductionOrderRecordsService; import cn.stylefeng.guns.modular.sc.repairManageInfo.service.RepairManageInfoService; import cn.stylefeng.guns.modular.sc.serialNumbersConf.service.SerialNumbersConfService; import cn.stylefeng.guns.plcserver.opc.GlobalVariable; import cn.stylefeng.guns.plcserver.opc.OPCComm; import cn.stylefeng.guns.plcserver.server.BOP010.BOP010ServerInterface; import cn.stylefeng.guns.plcserver.server.BOP010.impl.BOP010ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.BOP020.BOP020ServerInterface; import cn.stylefeng.guns.plcserver.server.BOP020.impl.BOP020ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.BOP030.BOP030ServerInterface; import cn.stylefeng.guns.plcserver.server.BOP030.impl.BOP030ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.BOP030B.BOP030BServerInterface; import cn.stylefeng.guns.plcserver.server.BOP030B.impl.BOP030BServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.BOP040.BOP040ServerInterface; import cn.stylefeng.guns.plcserver.server.BOP040.impl.BOP040ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.BOP040B.BOP040BServerInterface; import cn.stylefeng.guns.plcserver.server.BOP040B.impl.BOP040BServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.COP010.COP010ServerInterface; import cn.stylefeng.guns.plcserver.server.COP010.impl.COP010ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.COP020.COP020ServerInterface; import cn.stylefeng.guns.plcserver.server.COP020.impl.COP020ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.COP030.COP030ServerInterface; import cn.stylefeng.guns.plcserver.server.COP030.impl.COP030ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.DOP010.DOP010ServerInterface; import cn.stylefeng.guns.plcserver.server.DOP010.impl.DOP010ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.DOP020.DOP020ServerInterface; import cn.stylefeng.guns.plcserver.server.DOP020.impl.DOP020ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP010.EOP010ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP010.impl.EOP010ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP020.EOP020ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP020.impl.EOP020ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP030.EOP030ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP030.impl.EOP030ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP040.EOP040ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP040.impl.EOP040ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP050.EOP050ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP050.impl.EOP050ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP060.EOP060ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP060.impl.EOP060ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP070.EOP070ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP070.impl.EOP070ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP070B.EOP070BServerInterface; import cn.stylefeng.guns.plcserver.server.EOP070B.impl.EOP070BServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP080.EOP080ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP080.impl.EOP080ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP090.EOP090ServerInterface; import cn.stylefeng.guns.plcserver.server.EOP090.impl.EOP090ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.EOP090B.EOP090BServerInterface; import cn.stylefeng.guns.plcserver.server.EOP090B.impl.EOP090BServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP010.OP010ServerInterface; import cn.stylefeng.guns.plcserver.server.OP010.impl.OP010ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP020.OP020ServerInterface; import cn.stylefeng.guns.plcserver.server.OP020.impl.OP020ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP030.OP030ServerInterface; import cn.stylefeng.guns.plcserver.server.OP030.impl.OP030ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP040.OP040ServerInterface; import cn.stylefeng.guns.plcserver.server.OP040.impl.OP040ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP050.OP050ServerInterface; import cn.stylefeng.guns.plcserver.server.OP050.impl.OP050ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP070.OP070ServerInterface; import cn.stylefeng.guns.plcserver.server.OP070.impl.OP070ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP080.OP080ServerInterface; import cn.stylefeng.guns.plcserver.server.OP080.impl.OP080ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP090.OP090ServerInterface; import cn.stylefeng.guns.plcserver.server.OP090.impl.OP090ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP100.OP100ServerInterface; import cn.stylefeng.guns.plcserver.server.OP100.impl.OP100ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP110.OP110ServerInterface; import cn.stylefeng.guns.plcserver.server.OP110.impl.OP110ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP120.OP120ServerInterface; import cn.stylefeng.guns.plcserver.server.OP120.impl.OP120ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP120B.OP120BServerInterface; import cn.stylefeng.guns.plcserver.server.OP120B.impl.OP120BServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP130.OP130ServerInterface; import cn.stylefeng.guns.plcserver.server.OP130.impl.OP130ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP130B.OP130BServerInterface; import cn.stylefeng.guns.plcserver.server.OP130B.impl.OP130BServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP140.OP140ServerInterface; import cn.stylefeng.guns.plcserver.server.OP140.impl.OP140ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP150.OP150ServerInterface; import cn.stylefeng.guns.plcserver.server.OP150.impl.OP150ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP160.OP160ServerInterface; import cn.stylefeng.guns.plcserver.server.OP160.impl.OP160ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.OP170.OP170ServerInterface; import cn.stylefeng.guns.plcserver.server.OP170.impl.OP170ServerInterfaceImpl; import cn.stylefeng.guns.plcserver.server.state.StateServerInterface; import cn.stylefeng.guns.plcserver.server.state.impl.StateServerInterfaceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @Component @Order(1) public class OpcServiceMain implements CommandLineRunner { private OPCComm opc = OPCComm.getInstance(); @Autowired public ProductionOrdeInfoService productionOrdeInfoService; @Autowired public PassingStationCollectionService passingStationCollectionService; @Autowired public ParamCollectionService paramCollectionService; @Autowired public CollectionParamConfService collectionParamConfService; @Autowired public SerialNumbersConfService serialNumbersConfService; @Autowired private EquipmentStatusService equipmentStatusService; @Autowired private EquipmentAlarmService equipmentAlarmService; @Autowired private MaterialTraceabilityService materialTraceabilityService; @Autowired private EquipmentInfoService equipmentInfoService; @Autowired private RepairManageInfoService repairManageInfoService; @Autowired private LocationInfoService locationInfoService; @Autowired private GreaseManageService greaseManageService; @Autowired private ProductionOrderRecordsService productionOrderRecordsService; @Autowired private ProductionOrderBatchInfoService productionOrderBatchInfoService; @Override public void run(String... args) throws Exception { if(GlobalVariable.TERMINATED) { opc.init(productionOrdeInfoService,passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,productionOrderBatchInfoService); GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000198","1");//C1 36V GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000174","2");//C1 48V GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000194","3");//T1 36V GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000201","4");//T1 48V GlobalVariable.PRODUCT_CODE_MAP.put("1","12980500000198"); GlobalVariable.PRODUCT_CODE_MAP.put("2","12980500000174"); GlobalVariable.PRODUCT_CODE_MAP.put("3","12980500000194"); GlobalVariable.PRODUCT_CODE_MAP.put("4","12980500000201"); ExecutorService cachedThreadPool = Executors.newCachedThreadPool(); cachedThreadPool.execute(new OP010TaskThreadPool()); cachedThreadPool.execute(new OP020TaskThreadPool()); cachedThreadPool.execute(new OP030TaskThreadPool()); cachedThreadPool.execute(new OP040TaskThreadPool()); cachedThreadPool.execute(new OP050TaskThreadPool()); cachedThreadPool.execute(new OP070TaskThreadPool()); cachedThreadPool.execute(new OP080TaskThreadPool()); cachedThreadPool.execute(new OP090TaskThreadPool()); cachedThreadPool.execute(new OP100TaskThreadPool()); cachedThreadPool.execute(new OP110TaskThreadPool()); cachedThreadPool.execute(new OP120TaskThreadPool()); cachedThreadPool.execute(new OP120BTaskThreadPool()); cachedThreadPool.execute(new OP130TaskThreadPool()); cachedThreadPool.execute(new OP130BTaskThreadPool()); cachedThreadPool.execute(new OP140TaskThreadPool()); /* cachedThreadPool.execute(new OP150TaskThreadPool());*/ cachedThreadPool.execute(new OP160TaskThreadPool()); cachedThreadPool.execute(new OP170TaskThreadPool()); //COP cachedThreadPool.execute(new COP010TaskThreadPool()); cachedThreadPool.execute(new COP020TaskThreadPool()); cachedThreadPool.execute(new COP030TaskThreadPool()); //BOP cachedThreadPool.execute(new BOP010TaskThreadPool()); cachedThreadPool.execute(new BOP020TaskThreadPool()); cachedThreadPool.execute(new BOP030TaskThreadPool()); cachedThreadPool.execute(new BOP030BTaskThreadPool()); cachedThreadPool.execute(new BOP040TaskThreadPool()); cachedThreadPool.execute(new BOP040BTaskThreadPool()); //DOP cachedThreadPool.execute(new DOP010TaskThreadPool()); /*cachedThreadPool.execute(new DOP020TaskThreadPool());*/ //EOP cachedThreadPool.execute(new EOP010TaskThreadPool()); cachedThreadPool.execute(new EOP020TaskThreadPool()); cachedThreadPool.execute(new EOP030TaskThreadPool()); cachedThreadPool.execute(new EOP040TaskThreadPool()); cachedThreadPool.execute(new EOP050TaskThreadPool()); cachedThreadPool.execute(new EOP060TaskThreadPool()); cachedThreadPool.execute(new EOP070TaskThreadPool()); //cachedThreadPool.execute(new EOP070BTaskThreadPool()); cachedThreadPool.execute(new EOP080TaskThreadPool()); cachedThreadPool.execute(new EOP090TaskThreadPool()); cachedThreadPool.execute(new EOP090BTaskThreadPool()); cachedThreadPool.execute(new StateTaskThreadPool()); } } } class OP010TaskThreadPool implements Runnable { private OP010ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP010ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP020TaskThreadPool implements Runnable { private OP020ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP020ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP030TaskThreadPool implements Runnable { private OP030ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP030ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP040TaskThreadPool implements Runnable { private OP040ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP040ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP050TaskThreadPool implements Runnable { private OP050ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP050ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP070TaskThreadPool implements Runnable { private OP070ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP070ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP080TaskThreadPool implements Runnable { private OP080ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP080ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP090TaskThreadPool implements Runnable { private OP090ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP090ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP100TaskThreadPool implements Runnable { private OP100ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP100ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP110TaskThreadPool implements Runnable { private OP110ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP110ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP120TaskThreadPool implements Runnable { private OP120ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP120ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP120BTaskThreadPool implements Runnable { private OP120BServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP120BServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP130TaskThreadPool implements Runnable { private OP130ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP130ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP130BTaskThreadPool implements Runnable { private OP130BServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP130BServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP140TaskThreadPool implements Runnable { private OP140ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP140ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP150TaskThreadPool implements Runnable { private OP150ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP150ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP160TaskThreadPool implements Runnable { private OP160ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP160ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class OP170TaskThreadPool implements Runnable { private OP170ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new OP170ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class COP010TaskThreadPool implements Runnable { private COP010ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new COP010ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } }class COP020TaskThreadPool implements Runnable { private COP020ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new COP020ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class COP030TaskThreadPool implements Runnable { private COP030ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new COP030ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class BOP010TaskThreadPool implements Runnable { private BOP010ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new BOP010ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class BOP020TaskThreadPool implements Runnable { private BOP020ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new BOP020ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class BOP030TaskThreadPool implements Runnable { private BOP030ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new BOP030ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class BOP030BTaskThreadPool implements Runnable { private BOP030BServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new BOP030BServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class BOP040TaskThreadPool implements Runnable { private BOP040ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new BOP040ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class BOP040BTaskThreadPool implements Runnable { private BOP040BServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new BOP040BServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } //EOP class EOP010TaskThreadPool implements Runnable { private EOP010ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP010ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP020TaskThreadPool implements Runnable { private EOP020ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP020ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP030TaskThreadPool implements Runnable { private EOP030ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP030ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP040TaskThreadPool implements Runnable { private EOP040ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP040ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP050TaskThreadPool implements Runnable { private EOP050ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP050ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP060TaskThreadPool implements Runnable { private EOP060ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP060ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP070TaskThreadPool implements Runnable { private EOP070ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP070ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP070BTaskThreadPool implements Runnable { private EOP070BServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP070BServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP080TaskThreadPool implements Runnable { private EOP080ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP080ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP090TaskThreadPool implements Runnable { private EOP090ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP090ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class EOP090BTaskThreadPool implements Runnable { private EOP090BServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new EOP090BServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class DOP010TaskThreadPool implements Runnable { private DOP010ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new DOP010ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class DOP020TaskThreadPool implements Runnable { private DOP020ServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new DOP020ServerInterfaceImpl(); server.monitor(); Thread.sleep(GlobalVariable.SLEEP_TIME); } }catch(Exception e){ e.printStackTrace(); } } } class StateTaskThreadPool implements Runnable { private StateServerInterface server; public void run() { try { while (GlobalVariable.TERMINATED) { server = new StateServerInterfaceImpl(); server.monitor(); Thread.sleep(30*1000); } }catch(Exception e){ e.printStackTrace(); } } }