15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package com.sun.jndi.toolkit.dir; 26 27 import javax.naming.*; 28 import javax.naming.directory.*; 29 import javax.naming.spi.*; 30 import java.util.*; 31 32 /** 33 * A sample service provider that implements a hierarchical directory in memory. 34 * Every operation begins by doing a lookup on the name passed to it and then 35 * calls a corresponding "do<OperationName>" on the result of the lookup. The 36 * "do<OperationName>" does the work without any further resolution (it assumes 37 * that it is the target context). 38 */ 39 40 public class HierMemDirCtx implements DirContext { 41 42 static private final boolean debug = false; 43 private static final NameParser defaultParser = new HierarchicalNameParser(); 44 45 protected Hashtable<String, Object> myEnv; 46 protected Hashtable<Name, Object> bindings; 47 protected Attributes attrs; 48 protected boolean ignoreCase = false; 49 protected NamingException readOnlyEx = null; 50 protected NameParser myParser = defaultParser; 51 52 private boolean alwaysUseFactory; 53 54 public void close() throws NamingException { 55 myEnv = null; 56 bindings = null; | 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package com.sun.jndi.toolkit.dir; 26 27 import javax.naming.*; 28 import javax.naming.directory.*; 29 import javax.naming.spi.*; 30 import java.util.*; 31 32 /** 33 * A sample service provider that implements a hierarchical directory in memory. 34 * Every operation begins by doing a lookup on the name passed to it and then 35 * calls a corresponding "{@code do<OperationName>}" on the result of the lookup. The 36 * "{@code do<OperationName>}" does the work without any further resolution (it assumes 37 * that it is the target context). 38 */ 39 40 public class HierMemDirCtx implements DirContext { 41 42 static private final boolean debug = false; 43 private static final NameParser defaultParser = new HierarchicalNameParser(); 44 45 protected Hashtable<String, Object> myEnv; 46 protected Hashtable<Name, Object> bindings; 47 protected Attributes attrs; 48 protected boolean ignoreCase = false; 49 protected NamingException readOnlyEx = null; 50 protected NameParser myParser = defaultParser; 51 52 private boolean alwaysUseFactory; 53 54 public void close() throws NamingException { 55 myEnv = null; 56 bindings = null; |