|  |  |  | 
|---|
|  |  |  | import com.dy.common.queue.Queue; | 
|---|
|  |  |  | import com.dy.common.mw.UnitAdapterInterface; | 
|---|
|  |  |  | import com.dy.common.mw.UnitInterface; | 
|---|
|  |  |  | import com.dy.common.mw.UnitStartedCallbackInterface; | 
|---|
|  |  |  | import com.dy.common.mw.UnitCallbackInterface; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class CoreUnit implements UnitInterface { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void start(UnitStartedCallbackInterface callback) throws Exception { | 
|---|
|  |  |  | public void start(UnitCallbackInterface callback) throws Exception { | 
|---|
|  |  |  | if(!started){ | 
|---|
|  |  |  | started = true ; | 
|---|
|  |  |  | CoreThread ct = CoreThread.getInstance() ; | 
|---|
|  |  |  | ct.setSleep(this.adapter.getConfig().sleepBigBusy, this.adapter.getConfig().sleepSmallBusy); | 
|---|
|  |  |  | ct.start(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | CoreConstantThread cct = CoreConstantThread.getInstance() ; | 
|---|
|  |  |  | cct.setSleep(this.adapter.getConfig().sleepBigBusy, this.adapter.getConfig().sleepSmallBusy); | 
|---|
|  |  |  | cct.start(); | 
|---|
|  |  |  | CoreConstantManage ccm = CoreConstantManage.getInstance() ; | 
|---|
|  |  |  | ccm.setSleep(this.adapter.getConfig().sleepBigBusy, this.adapter.getConfig().sleepSmallBusy); | 
|---|
|  |  |  | ccm.start(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(adapter.getConfig().showStartInfo){ | 
|---|
|  |  |  | System.out.println("核心模块成功启动," | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void stop(UnitStartedCallbackInterface callback) { | 
|---|
|  |  |  | public void stop(UnitCallbackInterface callback) { | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|