1023 * @param name string 1024 * @exception NamingException See lookup. 1025 * @return the resolved object. 1026 */ 1027 public java.lang.Object lookupLink(String name) throws NamingException { 1028 return lookupLink(new CompositeName(name)); 1029 } 1030 1031 /** 1032 * Is mapped to resolve in the COS Naming api. 1033 * @param name string 1034 * @exception NamingException See lookup. 1035 * @return the resolved object. 1036 */ 1037 public java.lang.Object lookupLink(Name name) throws NamingException { 1038 return lookup(name); 1039 } 1040 1041 /** 1042 * Allow access to the name parser object. 1043 * @param String JNDI name, is ignored since there is only one Name 1044 * Parser object. 1045 * @exception NamingException -- 1046 * @return NameParser object 1047 */ 1048 public NameParser getNameParser(String name) throws NamingException { 1049 return parser; 1050 } 1051 1052 /** 1053 * Allow access to the name parser object. 1054 * @param Name JNDI name, is ignored since there is only one Name 1055 * Parser object. 1056 * @exception NamingException -- 1057 * @return NameParser object 1058 */ 1059 public NameParser getNameParser(Name name) throws NamingException { 1060 return parser; 1061 } 1062 1063 /** 1064 * Returns the current environment. 1065 * @return Environment. 1066 */ 1067 @SuppressWarnings("unchecked") 1068 public Hashtable<String, java.lang.Object> getEnvironment() throws NamingException { 1069 if (_env == null) { 1070 return new Hashtable<>(5, 0.75f); 1071 } else { 1072 return (Hashtable<String, java.lang.Object>)_env.clone(); 1073 } 1074 } 1075 1076 public String composeName(String name, String prefix) throws NamingException { 1077 return composeName(new CompositeName(name), 1078 new CompositeName(prefix)).toString(); 1079 } 1080 1081 public Name composeName(Name name, Name prefix) throws NamingException { 1082 Name result = (Name)prefix.clone(); 1083 return result.addAll(name); 1084 } 1085 1086 /** 1087 * Adds to the environment for the current context. 1088 * Record change but do not reinitialize ORB. 1089 * 1090 * @param propName The property name. 1091 * @param propVal The ORB. 1092 * @return the previous value of this property if any. 1093 */ 1094 @SuppressWarnings("unchecked") 1095 public java.lang.Object addToEnvironment(String propName, 1096 java.lang.Object propValue) 1097 throws NamingException { 1098 if (_env == null) { 1099 _env = new Hashtable<>(7, 0.75f); 1100 } else { 1101 // copy-on-write 1102 _env = (Hashtable<String, java.lang.Object>)_env.clone(); 1103 } 1104 1105 return _env.put(propName, propValue); 1106 } 1107 1108 // Record change but do not reinitialize ORB 1109 @SuppressWarnings("unchecked") 1110 public java.lang.Object removeFromEnvironment(String propName) 1111 throws NamingException { | 1023 * @param name string 1024 * @exception NamingException See lookup. 1025 * @return the resolved object. 1026 */ 1027 public java.lang.Object lookupLink(String name) throws NamingException { 1028 return lookupLink(new CompositeName(name)); 1029 } 1030 1031 /** 1032 * Is mapped to resolve in the COS Naming api. 1033 * @param name string 1034 * @exception NamingException See lookup. 1035 * @return the resolved object. 1036 */ 1037 public java.lang.Object lookupLink(Name name) throws NamingException { 1038 return lookup(name); 1039 } 1040 1041 /** 1042 * Allow access to the name parser object. 1043 * @param name JNDI name, is ignored since there is only one Name 1044 * Parser object. 1045 * @exception NamingException -- 1046 * @return NameParser object 1047 */ 1048 public NameParser getNameParser(String name) throws NamingException { 1049 return parser; 1050 } 1051 1052 /** 1053 * Allow access to the name parser object. 1054 * @param name JNDI name, is ignored since there is only one Name 1055 * Parser object. 1056 * @exception NamingException -- 1057 * @return NameParser object 1058 */ 1059 public NameParser getNameParser(Name name) throws NamingException { 1060 return parser; 1061 } 1062 1063 /** 1064 * Returns the current environment. 1065 * @return Environment. 1066 */ 1067 @SuppressWarnings("unchecked") 1068 public Hashtable<String, java.lang.Object> getEnvironment() throws NamingException { 1069 if (_env == null) { 1070 return new Hashtable<>(5, 0.75f); 1071 } else { 1072 return (Hashtable<String, java.lang.Object>)_env.clone(); 1073 } 1074 } 1075 1076 public String composeName(String name, String prefix) throws NamingException { 1077 return composeName(new CompositeName(name), 1078 new CompositeName(prefix)).toString(); 1079 } 1080 1081 public Name composeName(Name name, Name prefix) throws NamingException { 1082 Name result = (Name)prefix.clone(); 1083 return result.addAll(name); 1084 } 1085 1086 /** 1087 * Adds to the environment for the current context. 1088 * Record change but do not reinitialize ORB. 1089 * 1090 * @param propName The property name. 1091 * @param propValue The ORB. 1092 * @return the previous value of this property if any. 1093 */ 1094 @SuppressWarnings("unchecked") 1095 public java.lang.Object addToEnvironment(String propName, 1096 java.lang.Object propValue) 1097 throws NamingException { 1098 if (_env == null) { 1099 _env = new Hashtable<>(7, 0.75f); 1100 } else { 1101 // copy-on-write 1102 _env = (Hashtable<String, java.lang.Object>)_env.clone(); 1103 } 1104 1105 return _env.put(propName, propValue); 1106 } 1107 1108 // Record change but do not reinitialize ORB 1109 @SuppressWarnings("unchecked") 1110 public java.lang.Object removeFromEnvironment(String propName) 1111 throws NamingException { |