summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/naming/InitialContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/naming/InitialContext.java')
-rw-r--r--libjava/classpath/javax/naming/InitialContext.java114
1 files changed, 57 insertions, 57 deletions
diff --git a/libjava/classpath/javax/naming/InitialContext.java b/libjava/classpath/javax/naming/InitialContext.java
index a5fe5f0cf3a..c33122adf00 100644
--- a/libjava/classpath/javax/naming/InitialContext.java
+++ b/libjava/classpath/javax/naming/InitialContext.java
@@ -63,18 +63,18 @@ public class InitialContext implements Context
* this field.
*/
protected Context defaultInitCtx;
-
+
/**
* Indicates if the initial context was obtained by calling
- * {@link NamingManager#getInitialContext}.
+ * {@link NamingManager#getInitialContext}.
*/
protected boolean gotDefault = false;
-
+
/**
* The environment, associated with this initial context.
*/
protected Hashtable<Object,Object> myProps;
-
+
/**
* The list of the properties, to that the second alternative value must
* be appended after the colon to the first possible value. Used in
@@ -87,13 +87,13 @@ public class InitialContext implements Context
colon_list.add(Context.OBJECT_FACTORIES);
colon_list.add(Context.URL_PKG_PREFIXES);
colon_list.add(Context.STATE_FACTORIES);
- }
-
+ }
+
/**
* The properties that are searched in the agreed places in the
* {@link #init(Hashtable)} method.
*/
- static final String[] use_properties =
+ static final String[] use_properties =
{
Context.DNS_URL,
Context.INITIAL_CONTEXT_FACTORY,
@@ -102,11 +102,11 @@ public class InitialContext implements Context
Context.STATE_FACTORIES,
Context.URL_PKG_PREFIXES,
};
-
-
+
+
/**
* Creates the new initial context with the given properties.
- *
+ *
* @param environment the properties, used by the initial context being
* created.
* @throws NamingException
@@ -115,11 +115,11 @@ public class InitialContext implements Context
{
init(environment);
}
-
+
/**
* Creates the initial context with the possibility to delay its
* initialisation.
- *
+ *
* @param lazy specified if the initialization should not be performed by this
* constructor (true). If the valueis false, it works the same way as
* the parameterless constructor.
@@ -130,18 +130,18 @@ public class InitialContext implements Context
if (! lazy)
init(null);
}
-
+
/**
* Creates teh new initial context with no properties. Same as
* InitialContext(null).
- *
+ *
* @throws NamingException
*/
public InitialContext() throws NamingException
{
init(null);
}
-
+
/**
* <p>
* Initialises the context, using the properties, specified in the passed
@@ -160,7 +160,7 @@ public class InitialContext implements Context
* specified by the system property "gnu.classpath.home.url".
* </ul>
* </p>
- *
+ *
* @param environment the table of the properties, may be null. The method
* modifies the table and stores the reference to it. The caller must
* not later reuse this structure for other purposes.
@@ -191,12 +191,12 @@ public class InitialContext implements Context
if (value != null)
pApplet.put(key, value);
}
-
+
value = System.getProperty(key);
if (value != null)
pSystem.put(key, value);
}
-
+
merge(myProps, pSystem);
if (pApplet != null)
merge(myProps, pApplet);
@@ -249,7 +249,7 @@ public class InitialContext implements Context
merge(myProps, p);
}
}
-
+
/**
* Merge the content of the two tables. If the second table contains the key
* that is missing in the first table, this key - value pair is copied to the
@@ -257,16 +257,16 @@ public class InitialContext implements Context
* {@link #colon_list} set also contains this key, the value from the second
* table is appended to the value from the first table after semicolon, and
* the resulted value replaces the value in the first table.
- *
+ *
* @param primary the first table to merge. The merged result is also stored
* in this table.
* @param additional the second table, from where additional values are taken
- */
+ */
static void merge (Hashtable<Object, Object> primary,
Hashtable<Object, Object> additional)
{
Enumeration en = additional.keys();
-
+
while (en.hasMoreElements())
{
String key2 = (String) en.nextElement();
@@ -280,13 +280,13 @@ public class InitialContext implements Context
}
}
}
-
+
/**
* Get the default initial context. If {@link #gotDefault} == false, this
* method obtains the initial context from the naming manager and sets
* gotDefault to true. Otherwise the cached value ({@link #defaultInitCtx} is
* returned.
- *
+ *
* @return the default initial context
* @throws NamingException
*/
@@ -305,7 +305,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -323,7 +323,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -348,19 +348,19 @@ public class InitialContext implements Context
return getDefaultInitCtx();
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (Name name) throws NamingException
{
try
@@ -374,7 +374,7 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (String name) throws NamingException
{
try
@@ -388,147 +388,147 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rebind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
-
+
/** @inheritDoc */
public void rebind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (Name oldName, Name newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (String oldName, String newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<NameClassPair> list (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<NameClassPair> list (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<Binding> listBindings (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<Binding> listBindings (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Name composeName (Name name, Name prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
- /** @inheritDoc */
- public String composeName (String name,
+ /** @inheritDoc */
+ public String composeName (String name,
String prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
-
+
/** @inheritDoc */
- public Object addToEnvironment (String propName,
+ public Object addToEnvironment (String propName,
Object propVal) throws NamingException
{
return myProps.put (propName, propVal);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object removeFromEnvironment (String propName) throws NamingException
{
return myProps.remove (propName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Hashtable<?,?> getEnvironment () throws NamingException
{
return myProps;
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void close () throws NamingException
{
myProps = null;
@@ -537,7 +537,7 @@ public class InitialContext implements Context
/**
* This operation is not supported for the initial naming context.
- *
+ *
* @throws OperationNotSupportedException always, unless the method is
* overridden in the derived class.
*/