1 6 7 package SOFA.Connector.CCNSAccess; 8 9 import java.rmi.Naming ; 10 11 16 public class CCNSAccess { 17 18 public static SOFA.SOFAnode.Run.CCNS.ConnectorCacheNS openCCNS() throws CCNSAccessException { 19 try { 20 System.setSecurityManager(new java.rmi.RMISecurityManager ()); 21 String rmiport = System.getProperty("sofa.rmiport","1999"); 22 String rmihost = System.getProperty("sofa.rmihost","localhost"); 23 24 String rminame="//"+rmihost+":"+rmiport+"/CCNS"; 25 return (SOFA.SOFAnode.Run.CCNS.ConnectorCacheNS)Naming.lookup(rminame); 26 } catch (Exception e) { 27 throw new CCNSAccessException("Cannot access CCNS.",e); 28 } 29 } 30 } 31 | Popular Tags |