/** * <code>addObjectKey </code> is a proprietary method that allows the * internal objectKeyMap to be altered programmatically. The objectKeyMap * allows more readable corbaloc URLs by mapping the actual object key to * an arbitary string. See the jacorb.properties file for more information. * * @param key_name a <code>String</code> value e.g. NameService * @param target the object whose object key should be used. */ public void addObjectKey(String key_name, org.omg.CORBA.Object target) { objectKeyMap.addObjectKey(key_name, target); }
/** * <code>addObjectKey </code> is a proprietary method that allows the * internal objectKeyMap to be altered programmatically. The objectKeyMap * allows more readable corbaloc URLs by mapping the actual object key to * an arbitary string. See the jacorb.properties file for more information. * * @param key_name a <code>String</code> value e.g. NameService * @param full_path an <code>String</code> value e.g. file:/home/rnc/NameSingleton.ior */ public void addObjectKey(String key_name, String full_path) { objectKeyMap.addObjectKey(key_name, full_path); }
/** * @see #addObjectKey(String, String) * @param key_name a <code>String</code> value e.g. NameService * @param object an a reference to a object whose object key should be used. */ public void addObjectKey(String key_name, org.omg.CORBA.Object object) { addObjectKey(key_name, orb.object_to_string(object)); } }
/** * a helper method supplied to initialize the object key map. This * replaces functionality from the defunct Environment class to populate * a hash map based on the names starting with "jacorb.orb.ObjectKeyMap" */ public synchronized void configureObjectKeyMap(Configuration config) { final String prefix = "jacorb.orb.objectKeyMap."; final List<String> names = config.getAttributeNamesWithPrefix(prefix); try { for (Iterator<String> i = names.iterator(); i.hasNext(); ) { final String property = i.next(); final String key_name = property.substring(prefix.length()); final String full_path = config.getAttribute(property); addObjectKey(key_name, full_path); } } catch (ConfigurationException e) { throw new RuntimeException("should never happen", e); } }