1 31 package org.objectweb.proactive.core.util; 32 33 39 public class IbisProperties { 40 41 public static final String IBIS_DEFAULT_NAME_SERVER = "name_server"; 42 public static final String IBIS_DEFAULT_NAME_SERVER_POOL = "name_server_pool"; 43 public static final String IBIS_DEFAULT_POOL_HOST_NUMBER = "pool_host_number"; 44 45 private static java.util.Properties defaultProperties; 46 47 static { 48 defaultProperties = new java.util.Properties (); 49 IbisProperties.loadDefaultProperties(); 50 } 51 52 public static void loadDefaultProperties() { 53 defaultProperties.setProperty(IBIS_DEFAULT_NAME_SERVER, "localhost"); 54 defaultProperties.setProperty(IBIS_DEFAULT_NAME_SERVER_POOL, "rutget"); 55 defaultProperties.setProperty(IBIS_DEFAULT_POOL_HOST_NUMBER,"1"); 56 IbisProperties.addPropertiesToSystem(defaultProperties); 57 } 58 59 64 protected static void addPropertiesToSystem(java.util.Properties p) { 65 for (java.util.Enumeration e = p.propertyNames(); e.hasMoreElements();) { 66 String s = (String ) e.nextElement(); 67 if (System.getProperty(s) == null) { 69 System.setProperty(s, p.getProperty(s)); 70 } 71 } 72 } 73 74 public static void load() { 75 77 } 78 79 } 80 | Popular Tags |