Commit in hps-java/sandbox on MAIN | |||
RemoteAidaTest.java | +35 | added 1.1 |
put test class for remote AIDA into sandbox for now
diff -N RemoteAidaTest.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ RemoteAidaTest.java 29 Apr 2012 23:43:45 -0000 1.1 @@ -0,0 +1,35 @@
+package org.lcsim; + +import hep.aida.dev.IDevTree; +import hep.aida.ref.remote.RemoteServer; +import hep.aida.ref.remote.rmi.client.RmiStoreFactory; +import hep.aida.ref.remote.rmi.server.RmiServerImpl; + +import org.lcsim.util.aida.AIDA; + +public class RemoteAidaTest +{ + public static void main(String[] args) { + setupRemoteAida(); + while (true) { + } + } + + private static void setupRemoteAida() { + final String AIDAName = "hps"; + + RmiStoreFactory store = new RmiStoreFactory(); // FIXME: Is this even needed??? + boolean serverDuplex = true; + RemoteServer treeServer = new RemoteServer((IDevTree) AIDA.defaultInstance().tree(), serverDuplex); + try { + RmiServerImpl impl = new RmiServerImpl(treeServer, "/" + AIDAName); + //System.out.println("remote AIDA name: " + impl.getBindName()); + //System.out.println("client host: " + RmiServerImpl.getClientHost()); + } + catch (Exception e) { + System.out.println("Error setting up remote AIDA."); + e.printStackTrace(); + } + //logger.log(Level.INFO, "Remote AIDA tree bound: {0}", impl.getBindName()); + } +}
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1