|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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 RmiUnit implements UnitInterface { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private static RmiFrameWork rmiFrm = null ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private RmiUnit(){} ; | 
|---|
|  |  |  | private RmiUnit(){} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static RmiUnit getInstance(){ | 
|---|
|  |  |  | return instance ; | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 启动模块 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void start(UnitStartedCallbackInterface callback) throws Exception { | 
|---|
|  |  |  | public void start(UnitCallbackInterface callback) throws Exception { | 
|---|
|  |  |  | if(!started){ | 
|---|
|  |  |  | started = true ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | System.out.println("Rmi通信模块启动失败!"); | 
|---|
|  |  |  | isException = true ; | 
|---|
|  |  |  | }finally{ | 
|---|
|  |  |  | ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(!isException){ | 
|---|
|  |  |  | if(vo.showStartInfo != null && vo.showStartInfo.booleanValue()){ | 
|---|
|  |  |  | if(vo.showStartInfo != null && vo.showStartInfo){ | 
|---|
|  |  |  | System.out.println("Rmi模块成功启动,端口:" + vo.port + ",上下文为:" + vo.context ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void stop(UnitStartedCallbackInterface callback) throws Exception { | 
|---|
|  |  |  | public void stop(UnitCallbackInterface callback) { | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|