KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > winstone > jndi > WinstoneNameParser


1 /*
2  * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
3  * Distributed under the terms of either:
4  * - the common development and distribution license (CDDL), v1.0; or
5  * - the GNU Lesser General Public License, v2.1 or later
6  */

7 package winstone.jndi;
8
9 import java.util.Properties JavaDoc;
10
11 import javax.naming.CompoundName JavaDoc;
12 import javax.naming.Name JavaDoc;
13 import javax.naming.NameParser JavaDoc;
14 import javax.naming.NamingException JavaDoc;
15
16 /**
17  * The name parser for winstone jndi names
18  *
19  * @author <a HREF="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
20  * @version $Id: WinstoneNameParser.java,v 1.2 2006/02/28 07:32:48 rickknowles Exp $
21  */

22 public class WinstoneNameParser implements NameParser JavaDoc {
23     private static final Properties JavaDoc syntax = new Properties JavaDoc();
24     static {
25         syntax.put("jndi.syntax.direction", "left_to_right");
26         syntax.put("jndi.syntax.separator", "/");
27         syntax.put("jndi.syntax.ignorecase", "false");
28         syntax.put("jndi.syntax.escape", "\\");
29         syntax.put("jndi.syntax.beginquote", "'");
30     }
31
32     public Name JavaDoc parse(String JavaDoc name) throws NamingException JavaDoc {
33         return new CompoundName JavaDoc(name, syntax);
34     }
35 }
36
Popular Tags