ms4jnameparser.java
来自「Java实现的Socket框架」· Java 代码 · 共 50 行
JAVA
50 行
/**
* Project:ms4j (Message Server for Java)
* Date:2007-2-15
* Authoer : jobsun@gmail.com
*
* Copyright 2007, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
package com.sunjob.ms4j.jndi;
import java.util.Properties;
import javax.naming.CompoundName;
import javax.naming.Name;
import javax.naming.NameParser;
import javax.naming.NamingException;
/**
* @author sunjob
*
*/
public class Ms4jNameParser implements NameParser {
static Properties syntax = new Properties();
static {
syntax.put("jndi.syntax.direction", "ms4j");
syntax.put("jndi.syntax.ignorecase", "false");
}
/* (non-Javadoc)
* @see javax.naming.NameParser#parse(java.lang.String)
*/
public Name parse(String arg0) throws NamingException {
return new CompoundName(arg0, syntax);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?