|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.tudelft.simulation.naming.InitialEventContext
public class InitialEventContext
This class is the starting context for performing naming operations.
(c) copyright 2002-2005 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
| Field Summary | |
|---|---|
protected EventContext |
defaultInitCtx
Field holding the result of calling NamingManager.getInitialContext(). |
protected boolean |
gotDefault
Field indicating whether the initial context has been obtained by calling NamingManager.getInitialContext(). |
protected Hashtable |
myProps
the properties of the initialEventContext |
| Fields inherited from interface javax.naming.event.EventContext |
|---|
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE |
| Fields inherited from interface javax.naming.Context |
|---|
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
| Constructor Summary | |
|---|---|
|
InitialEventContext()
Constructs an initial context. |
protected |
InitialEventContext(boolean lazy)
Constructs an initial context with the option of not initializing it. |
|
InitialEventContext(Hashtable environment)
Constructs an initial context using the supplied environment. |
| Method Summary | |
|---|---|
void |
addNamingListener(Name target,
int scope,
NamingListener l)
|
void |
addNamingListener(String target,
int scope,
NamingListener l)
|
Object |
addToEnvironment(String propName,
Object propVal)
|
void |
bind(Name name,
Object obj)
|
void |
bind(String name,
Object obj)
|
void |
close()
|
Name |
composeName(Name name,
Name prefix)
Composes the name of this context with a name relative to this context. |
String |
composeName(String name,
String prefix)
Composes the name of this context with a name relative to this context. |
Context |
createSubcontext(Name name)
|
Context |
createSubcontext(String name)
|
void |
destroySubcontext(Name name)
|
void |
destroySubcontext(String name)
|
protected EventContext |
getDefaultInitCtx()
Retrieves the initial context by calling NamingManager.getInitialContext() and cache it in defaultInitCtx. |
Hashtable |
getEnvironment()
|
String |
getNameInNamespace()
|
NameParser |
getNameParser(Name name)
|
NameParser |
getNameParser(String name)
|
protected Context |
getURLOrDefaultInitCtx(Name name)
|
protected Context |
getURLOrDefaultInitCtx(String name)
Retrieves a context for resolving the string name name. |
protected void |
init(Hashtable environment)
Initializes the initial context using the supplied environment. |
NamingEnumeration |
list(Name name)
|
NamingEnumeration |
list(String name)
|
NamingEnumeration |
listBindings(Name name)
|
NamingEnumeration |
listBindings(String name)
|
Object |
lookup(Name name)
|
Object |
lookup(String name)
|
Object |
lookupLink(Name name)
|
Object |
lookupLink(String name)
|
void |
rebind(Name name,
Object obj)
|
void |
rebind(String name,
Object obj)
|
Object |
removeFromEnvironment(String propName)
|
void |
removeNamingListener(NamingListener l)
|
void |
rename(Name oldName,
Name newName)
|
void |
rename(String oldName,
String newName)
|
boolean |
targetMustExist()
|
void |
unbind(Name name)
|
void |
unbind(String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Hashtable myProps
protected EventContext defaultInitCtx
protected boolean gotDefault
defaultInitCtx.
| Constructor Detail |
|---|
protected InitialEventContext(boolean lazy)
throws NamingException
lazy - true means do not initialize the initial context; false is
equivalent to calling new InitialContext()
NamingException - if a naming exception is encounteredinit(Hashtable)
public InitialEventContext()
throws NamingException
NamingException - if a naming exception is encountered
public InitialEventContext(Hashtable environment)
throws NamingException
This constructor will not modify environment or save a reference to it, but may save a clone.
environment - environment used to create the initial context. Null
indicates an empty environment.
NamingException - if a naming exception is encountered| Method Detail |
|---|
protected void init(Hashtable environment)
throws NamingException
This method will modify environment and save a reference to it. The caller may no longer modify it.
environment - environment used to create the initial context. Null
indicates an empty environment.
NamingException - if a naming exception is encountered
protected EventContext getDefaultInitCtx()
throws NamingException
gotDefault so that we know we've tried this before.
NamingException - If a naming exception was encountered.
protected Context getURLOrDefaultInitCtx(String name)
throws NamingException
name.
If name name is a URL string, then attempt to find a URL
context for it. If none is found, or if name is not a URL
string, then return getDefaultInitCtx().
See getURLOrDefaultInitCtx(Name) for description of how a subclass should use this method.
name - The non-null name for which to get the context.
name or the cached initial
context. The result cannot be null.
NamingException - on exception
protected Context getURLOrDefaultInitCtx(Name name)
throws NamingException
name - The non-null name for which to get the context.
name
NamingException - In a naming exception is encountered.
public Object lookup(String name)
throws NamingException
lookup in interface ContextNamingExceptionContext.lookup(java.lang.String)
public Object lookup(Name name)
throws NamingException
lookup in interface ContextNamingExceptionContext.lookup(javax.naming.Name)
public void bind(String name,
Object obj)
throws NamingException
bind in interface ContextNamingExceptionContext.bind(java.lang.String, java.lang.Object)
public void bind(Name name,
Object obj)
throws NamingException
bind in interface ContextNamingExceptionContext.bind(javax.naming.Name, java.lang.Object)
public void rebind(String name,
Object obj)
throws NamingException
rebind in interface ContextNamingExceptionContext.rebind(java.lang.String, java.lang.Object)
public void rebind(Name name,
Object obj)
throws NamingException
rebind in interface ContextNamingExceptionContext.rebind(javax.naming.Name, java.lang.Object)
public void unbind(String name)
throws NamingException
unbind in interface ContextNamingExceptionContext.unbind(java.lang.String)
public void unbind(Name name)
throws NamingException
unbind in interface ContextNamingExceptionContext.unbind(javax.naming.Name)
public void rename(String oldName,
String newName)
throws NamingException
rename in interface ContextNamingExceptionContext.rename(java.lang.String, java.lang.String)
public void rename(Name oldName,
Name newName)
throws NamingException
rename in interface ContextNamingExceptionContext.rename(javax.naming.Name, javax.naming.Name)
public NamingEnumeration list(String name)
throws NamingException
list in interface ContextNamingExceptionContext.list(java.lang.String)
public NamingEnumeration list(Name name)
throws NamingException
list in interface ContextNamingExceptionContext.list(javax.naming.Name)
public NamingEnumeration listBindings(String name)
throws NamingException
listBindings in interface ContextNamingExceptionContext.listBindings(java.lang.String)
public NamingEnumeration listBindings(Name name)
throws NamingException
listBindings in interface ContextNamingExceptionContext.listBindings(javax.naming.Name)
public void destroySubcontext(String name)
throws NamingException
destroySubcontext in interface ContextNamingExceptionContext.destroySubcontext(java.lang.String)
public void destroySubcontext(Name name)
throws NamingException
destroySubcontext in interface ContextNamingExceptionContext.destroySubcontext(javax.naming.Name)
public Context createSubcontext(String name)
throws NamingException
createSubcontext in interface ContextNamingExceptionContext.createSubcontext(java.lang.String)
public Context createSubcontext(Name name)
throws NamingException
createSubcontext in interface ContextNamingExceptionContext.createSubcontext(javax.naming.Name)
public Object lookupLink(String name)
throws NamingException
lookupLink in interface ContextNamingExceptionContext.lookupLink(java.lang.String)
public Object lookupLink(Name name)
throws NamingException
lookupLink in interface ContextNamingExceptionContext.lookupLink(javax.naming.Name)
public NameParser getNameParser(String name)
throws NamingException
getNameParser in interface ContextNamingExceptionContext.getNameParser(java.lang.String)
public NameParser getNameParser(Name name)
throws NamingException
getNameParser in interface ContextNamingExceptionContext.getNameParser(javax.naming.Name)
public String composeName(String name,
String prefix)
throws NamingException
composeName in interface Contextname - the nameprefix - the prefix
NamingException - on exception
public Name composeName(Name name,
Name prefix)
throws NamingException
composeName in interface Contextname - the nameprefix - the prefix
NamingException - on exception
public Object addToEnvironment(String propName,
Object propVal)
throws NamingException
addToEnvironment in interface ContextNamingException#addToEnvironment(java.lang.String,
java.lang.Object)
public Object removeFromEnvironment(String propName)
throws NamingException
removeFromEnvironment in interface ContextNamingExceptionContext.removeFromEnvironment(java.lang.String)
public Hashtable getEnvironment()
throws NamingException
getEnvironment in interface ContextNamingExceptionContext.getEnvironment()
public void close()
throws NamingException
close in interface ContextNamingExceptionContext.close()
public String getNameInNamespace()
throws NamingException
getNameInNamespace in interface ContextNamingExceptionContext.getNameInNamespace()
public void addNamingListener(Name target,
int scope,
NamingListener l)
throws NamingException
addNamingListener in interface EventContextNamingException#addNamingListener(javax.naming.Name, int, NamingListener)
public void addNamingListener(String target,
int scope,
NamingListener l)
throws NamingException
addNamingListener in interface EventContextNamingException#addNamingListener(java.lang.String,
int, NamingListener)
public void removeNamingListener(NamingListener l)
throws NamingException
removeNamingListener in interface EventContextNamingException#removeNamingListener(javax.naming.event.NamingListener)
public boolean targetMustExist()
throws NamingException
targetMustExist in interface EventContextNamingExceptionEventContext.targetMustExist()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||