|  |  |  | 
|---|
|  |  |  | import org.jdom2.Document; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.mw.UnitInterface; | 
|---|
|  |  |  | import com.dy.common.mw.UnitStartedCallbackInterface; | 
|---|
|  |  |  | import com.dy.common.mw.UnitCallbackInterface; | 
|---|
|  |  |  | import com.dy.common.mw.channel.rmi.RmiConfigVo; | 
|---|
|  |  |  | import com.dy.common.mw.channel.rmi.RmiUnit; | 
|---|
|  |  |  | import com.dy.common.util.ConfigXml; | 
|---|
|  |  |  | import com.dy.common.util.NumUtil; | 
|---|
|  |  |  | import com.dy.common.util.ConfigXmlNoSpringboot; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class Server{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private ConfigXml conf = null ; | 
|---|
|  |  |  | private ConfigXmlNoSpringboot conf = null ; | 
|---|
|  |  |  | private Document doc = null ; | 
|---|
|  |  |  | private boolean showStartInfo = false ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | Server sv = new Server(); | 
|---|
|  |  |  | long start = System.currentTimeMillis() ; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | sv.conf = new ConfigXml() ; | 
|---|
|  |  |  | sv.conf = new ConfigXmlNoSpringboot() ; | 
|---|
|  |  |  | sv.doc = sv.conf.createDom(sv.getClass(), "config.xml") ; | 
|---|
|  |  |  | //////////////// | 
|---|
|  |  |  | //服务 配置 | 
|---|
|  |  |  | 
|---|
|  |  |  | rmiAdap.setConfig(rmiVo); | 
|---|
|  |  |  | RmiUnit rmiUnit = RmiUnit.getInstance(); | 
|---|
|  |  |  | rmiUnit.setAdapter(rmiAdap); | 
|---|
|  |  |  | rmiUnit.start(new UnitStartedCallbackInterface(){ | 
|---|
|  |  |  | rmiUnit.start(new UnitCallbackInterface(){ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void call(Object obj) { | 
|---|
|  |  |  | } | 
|---|