本文整理汇总了Java中javax.naming.spi.ResolveResult.getResolvedObj方法的典型用法代码示例。如果您正苦于以下问题:Java ResolveResult.getResolvedObj方法的具体用法?Java ResolveResult.getResolvedObj怎么用?Java ResolveResult.getResolvedObj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.naming.spi.ResolveResult
的用法示例。
在下文中一共展示了ResolveResult.getResolvedObj方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rename
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public void rename(String oldName, String newName) throws NamingException {
String oldPrefix = getURLPrefix(oldName);
String newPrefix = getURLPrefix(newName);
if (!urlEquals(oldPrefix, newPrefix)) {
throw new OperationNotSupportedException(
"Renaming using different URL prefixes not supported : " +
oldName + " " + newName);
}
ResolveResult res = getRootURLContext(oldName, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
ctx.rename(res.getRemainingName(), getURLSuffix(newPrefix, newName));
} finally {
ctx.close();
}
}
示例2: searchUsingURL
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
private NamingEnumeration<SearchResult> searchUsingURL(String name)
throws NamingException {
LdapURL url = new LdapURL(name);
ResolveResult res = getRootURLContext(name, myEnv);
DirContext ctx = (DirContext)res.getResolvedObj();
try {
return ctx.search(res.getRemainingName(),
setFilterUsingURL(url),
setSearchControlsUsingURL(url));
} finally {
ctx.close();
}
}
示例3: bind
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public void bind(String name, Object obj, Attributes attrs)
throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
DirContext ctx = (DirContext)res.getResolvedObj();
try {
ctx.bind(res.getRemainingName(), obj, attrs);
} finally {
ctx.close();
}
}
示例4: lookupLink
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public Object lookupLink(String name) throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
return ctx.lookupLink(res.getRemainingName());
} finally {
ctx.close();
}
}
示例5: getSchemaClassDefinition
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public DirContext getSchemaClassDefinition(String name)
throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
DirContext ctx = (DirContext)res.getResolvedObj();
try {
return ctx.getSchemaClassDefinition(res.getRemainingName());
} finally {
ctx.close();
}
}
示例6: unbind
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public void unbind(String name) throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
ctx.unbind(res.getRemainingName());
} finally {
ctx.close();
}
}
示例7: destroySubcontext
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public void destroySubcontext(String name) throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
ctx.destroySubcontext(res.getRemainingName());
} finally {
ctx.close();
}
}
示例8: getAttributes
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public Attributes getAttributes(String name, String[] attrIds)
throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
DirContext ctx = (DirContext)res.getResolvedObj();
try {
return ctx.getAttributes(res.getRemainingName(), attrIds);
} finally {
ctx.close();
}
}
示例9: list
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
return ctx.list(res.getRemainingName());
} finally {
ctx.close();
}
}
示例10: createSubcontext
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public Context createSubcontext(String name) throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
return ctx.createSubcontext(res.getRemainingName());
} finally {
ctx.close();
}
}
示例11: listBindings
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public NamingEnumeration<Binding> listBindings(String name)
throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
return ctx.listBindings(res.getRemainingName());
} finally {
ctx.close();
}
}
示例12: lookup
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public Object lookup(String name) throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
Context ctx = (Context)res.getResolvedObj();
try {
return ctx.lookup(res.getRemainingName());
} finally {
ctx.close();
}
}
示例13: search
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public NamingEnumeration<SearchResult> search(String name,
String filterExpr,
Object[] filterArgs,
SearchControls cons)
throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
DirContext ctx = (DirContext)res.getResolvedObj();
try {
return
ctx.search(res.getRemainingName(), filterExpr, filterArgs, cons);
} finally {
ctx.close();
}
}
示例14: search
import javax.naming.spi.ResolveResult; //导入方法依赖的package包/类
public NamingEnumeration<SearchResult> search(String name,
String filter,
SearchControls cons)
throws NamingException {
ResolveResult res = getRootURLContext(name, myEnv);
DirContext ctx = (DirContext)res.getResolvedObj();
try {
return ctx.search(res.getRemainingName(), filter, cons);
} finally {
ctx.close();
}
}