|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.jndi.NamingContext
public class NamingContext
NamingContext
Implementation of Context interface.
All Names are expected to be Compound, not Composite.
| 嵌套类摘要 | |
|---|---|
static interface |
NamingContext.Listener
Naming Context Listener. |
| 字段摘要 | |
|---|---|
protected Map<String,Binding> |
_bindings
|
protected Hashtable<String,Object> |
_env
|
protected String |
_name
|
protected NamingContext |
_parent
|
protected NameParser |
_parser
|
static String |
LOCK_PROPERTY
|
static String |
UNLOCK_PROPERTY
|
| 构造方法摘要 | |
|---|---|
NamingContext(Hashtable<String,Object> env,
String name,
NamingContext parent,
NameParser parser)
Constructor |
|
| 方法摘要 | |
|---|---|
void |
addBinding(Name name,
Object obj)
Add a name to object binding to this Context. |
void |
addListener(NamingContext.Listener listener)
|
Object |
addToEnvironment(String propName,
Object propVal)
Add an environment setting to this Context |
void |
bind(Name name,
Object obj)
Bind a name to an object |
void |
bind(String name,
Object obj)
Bind a name (as a String) to an object |
Object |
clone()
Clone this NamingContext |
void |
close()
Do nothing |
Name |
composeName(Name name,
Name prefix)
Join two names together. |
String |
composeName(String name,
String prefix)
Join two names together. |
Context |
createSubcontext(Name name)
Create a context as a child of this one |
Context |
createSubcontext(String name)
Create a Context as a child of this one |
void |
destroySubcontext(Name name)
|
void |
destroySubcontext(String name)
|
String |
dump()
|
void |
dump(Appendable out,
String indent)
|
Binding |
getBinding(Name name)
Get a name to object binding from this Context |
Binding |
getBinding(String name)
Get a name to object binding from this Context |
Map<String,Binding> |
getBindings()
|
Hashtable |
getEnvironment()
Get the environment of this Context. |
String |
getName()
Getter for _name |
String |
getNameInNamespace()
Get the full name of this Context node by visiting it's ancestors back to root. |
NameParser |
getNameParser(Name name)
Return a NameParser for this Context. |
NameParser |
getNameParser(String name)
Return a NameParser for this Context. |
Context |
getParent()
Getter for _parent |
boolean |
isLocked()
|
NamingEnumeration |
list(Name name)
List all names bound at Context named by Name |
NamingEnumeration |
list(String name)
List all names bound at Context named by Name |
NamingEnumeration |
listBindings(Name name)
List all Bindings present at Context named by Name |
NamingEnumeration |
listBindings(String name)
List all Bindings at Name |
Object |
lookup(Name name)
Lookup a binding by name |
Object |
lookup(String name)
Lookup binding of an object by name |
Object |
lookupLink(Name name)
Lookup link bound to name |
Object |
lookupLink(String name)
Lookup link bound to name |
void |
rebind(Name name,
Object obj)
Overwrite or create a binding |
void |
rebind(String name,
Object obj)
Overwrite or create a binding from Name to Object |
void |
removeBinding(Name name)
|
Object |
removeFromEnvironment(String propName)
Remove a property from this Context's environment. |
boolean |
removeListener(NamingContext.Listener listener)
|
void |
rename(Name oldName,
Name newName)
Not supported |
void |
rename(String oldName,
String newName)
Not supported |
void |
setBindings(Map<String,Binding> bindings)
|
void |
setEnv(Hashtable<String,Object> env)
|
void |
setNameParser(NameParser parser)
Setter for _parser |
Name |
toCanonicalName(Name name)
Remove leading or trailing empty components from name. |
void |
unbind(Name name)
Not supported. |
void |
unbind(String name)
Not supported. |
| 从类 java.lang.Object 继承的方法 |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final String LOCK_PROPERTY
public static final String UNLOCK_PROPERTY
protected final Hashtable<String,Object> _env
protected Map<String,Binding> _bindings
protected NamingContext _parent
protected String _name
protected NameParser _parser
| 构造方法详细信息 |
|---|
public NamingContext(Hashtable<String,Object> env,
String name,
NamingContext parent,
NameParser parser)
env - environment propertiesname - relative name of this contextparent - immediate ancestor Context (can be null)parser - NameParser for this Context| 方法详细信息 |
|---|
public Object clone()
throws CloneNotSupportedException
Object 中的 cloneCloneNotSupportedException - if an error occurspublic String getName()
public Context getParent()
public void setNameParser(NameParser parser)
public void setEnv(Hashtable<String,Object> env)
public Map<String,Binding> getBindings()
public void setBindings(Map<String,Binding> bindings)
public void bind(Name name,
Object obj)
throws NamingException
Context 中的 bindname - Name of the objectobj - object to bind
NamingException - if an error occurs
public void bind(String name,
Object obj)
throws NamingException
Context 中的 bindname - a String valueobj - an Object value
NamingException - if an error occurs
public Context createSubcontext(Name name)
throws NamingException
Context 中的 createSubcontextname - a Name value
Context value
NamingException - if an error occurs
public Context createSubcontext(String name)
throws NamingException
Context 中的 createSubcontextname - a String value
Context value
NamingException - if an error occurs
public void destroySubcontext(String name)
throws NamingException
Context 中的 destroySubcontextname - name of subcontext to remove
NamingException - if an error occurs
public void destroySubcontext(Name name)
throws NamingException
Context 中的 destroySubcontextname - name of subcontext to remove
NamingException - if an error occurs
public Object lookup(Name name)
throws NamingException
Context 中的 lookupname - name of bound object
NamingException - if an error occurs
public Object lookup(String name)
throws NamingException
Context 中的 lookupname - name of bound object
NamingException - if an error occurs
public Object lookupLink(Name name)
throws NamingException
Context 中的 lookupLinkname - name of link binding
NamingException - if an error occurs
public Object lookupLink(String name)
throws NamingException
Context 中的 lookupLinkname - name of link binding
NamingException - if an error occurs
public NamingEnumeration list(Name name)
throws NamingException
Context 中的 listname - a Name value
NamingEnumeration value
NamingException - if an error occurs
public NamingEnumeration list(String name)
throws NamingException
Context 中的 listname - a Name value
NamingEnumeration value
NamingException - if an error occurs
public NamingEnumeration listBindings(Name name)
throws NamingException
Context 中的 listBindingsname - a Name value
NamingEnumeration value
NamingException - if an error occurs
public NamingEnumeration listBindings(String name)
throws NamingException
Context 中的 listBindingsname - a String value
NamingEnumeration value
NamingException - if an error occurs
public void rebind(Name name,
Object obj)
throws NamingException
Context 中的 rebindname - a Name valueobj - an Object value
NamingException - if an error occurs
public void rebind(String name,
Object obj)
throws NamingException
Context 中的 rebindname - a String valueobj - an Object value
NamingException - if an error occurs
public void unbind(String name)
throws NamingException
Context 中的 unbindname - a String value
NamingException - if an error occurs
public void unbind(Name name)
throws NamingException
Context 中的 unbindname - a String value
NamingException - if an error occurs
public void rename(Name oldName,
Name newName)
throws NamingException
Context 中的 renameoldName - a Name valuenewName - a Name value
NamingException - if an error occurs
public void rename(String oldName,
String newName)
throws NamingException
Context 中的 renameoldName - a Name valuenewName - a Name value
NamingException - if an error occurs
public Name composeName(Name name,
Name prefix)
throws NamingException
Context 中的 composeNamename - a Name valueprefix - a Name value
Name value
NamingException - if an error occurs
public String composeName(String name,
String prefix)
throws NamingException
Context 中的 composeNamename - a Name valueprefix - a Name value
Name value
NamingException - if an error occurs
public void close()
throws NamingException
Context 中的 closeNamingException - if an error occurspublic NameParser getNameParser(Name name)
Context 中的 getNameParsername - a Name value
NameParser valuepublic NameParser getNameParser(String name)
Context 中的 getNameParsername - a Name value
NameParser value
public String getNameInNamespace()
throws NamingException
Context 中的 getNameInNamespaceNamingException - if an error occurs
public Object addToEnvironment(String propName,
Object propVal)
throws NamingException
Context 中的 addToEnvironmentpropName - name of the property to addpropVal - value of the property to add
NamingException - if an error occurs
public Object removeFromEnvironment(String propName)
throws NamingException
Context 中的 removeFromEnvironmentpropName - name of property to remove
NamingException - if an error occurspublic Hashtable getEnvironment()
Context 中的 getEnvironment
public void addBinding(Name name,
Object obj)
throws NameAlreadyBoundException
name - a Name valueobj - an Object value
NameAlreadyBoundExceptionpublic Binding getBinding(Name name)
name - a Name value
Binding valuepublic Binding getBinding(String name)
name - as a String
public void removeBinding(Name name)
public Name toCanonicalName(Name name)
name - the name to normalize
public boolean isLocked()
public String dump()
Dumpable 中的 dump
public void dump(Appendable out,
String indent)
throws IOException
Dumpable 中的 dumpIOExceptionpublic void addListener(NamingContext.Listener listener)
public boolean removeListener(NamingContext.Listener listener)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||