summaryrefslogtreecommitdiff
path: root/javax/naming/spi
diff options
context:
space:
mode:
Diffstat (limited to 'javax/naming/spi')
-rw-r--r--javax/naming/spi/DirObjectFactory.java2
-rw-r--r--javax/naming/spi/DirStateFactory.java2
-rw-r--r--javax/naming/spi/DirectoryManager.java4
-rw-r--r--javax/naming/spi/InitialContextFactory.java3
-rw-r--r--javax/naming/spi/InitialContextFactoryBuilder.java10
-rw-r--r--javax/naming/spi/NamingManager.java57
-rw-r--r--javax/naming/spi/ObjectFactory.java5
-rw-r--r--javax/naming/spi/ObjectFactoryBuilder.java4
-rw-r--r--javax/naming/spi/Resolver.java41
-rw-r--r--javax/naming/spi/StateFactory.java2
10 files changed, 56 insertions, 74 deletions
diff --git a/javax/naming/spi/DirObjectFactory.java b/javax/naming/spi/DirObjectFactory.java
index ea0e69706..1a71c28f7 100644
--- a/javax/naming/spi/DirObjectFactory.java
+++ b/javax/naming/spi/DirObjectFactory.java
@@ -51,6 +51,6 @@ import javax.naming.directory.Attributes;
public interface DirObjectFactory extends ObjectFactory
{
Object getObjectInstance(Object obj, Name name, Context nameCtx,
- Hashtable environment, Attributes attrs)
+ Hashtable<?, ?> environment, Attributes attrs)
throws Exception;
}
diff --git a/javax/naming/spi/DirStateFactory.java b/javax/naming/spi/DirStateFactory.java
index b5add91cb..6ddd12f36 100644
--- a/javax/naming/spi/DirStateFactory.java
+++ b/javax/naming/spi/DirStateFactory.java
@@ -77,7 +77,7 @@ public interface DirStateFactory extends StateFactory
DirStateFactory.Result getStateToBind(Object obj, Name name,
Context nameCtx,
- Hashtable environment,
+ Hashtable<?, ?> environment,
Attributes inAttrs)
throws NamingException;
}
diff --git a/javax/naming/spi/DirectoryManager.java b/javax/naming/spi/DirectoryManager.java
index fd482efb5..a6d91b20c 100644
--- a/javax/naming/spi/DirectoryManager.java
+++ b/javax/naming/spi/DirectoryManager.java
@@ -93,7 +93,7 @@ public class DirectoryManager extends NamingManager
public static Object getObjectInstance (Object refInfo, Name name,
Context nameCtx,
- Hashtable environment,
+ Hashtable<?, ?> environment,
Attributes attrs)
throws Exception
{
@@ -186,7 +186,7 @@ public class DirectoryManager extends NamingManager
public static DirStateFactory.Result getStateToBind (Object obj,
Name name,
Context nameCtx,
- Hashtable environment,
+ Hashtable<?, ?> environment,
Attributes attrs)
throws NamingException
{
diff --git a/javax/naming/spi/InitialContextFactory.java b/javax/naming/spi/InitialContextFactory.java
index d9b3336dc..f715327ef 100644
--- a/javax/naming/spi/InitialContextFactory.java
+++ b/javax/naming/spi/InitialContextFactory.java
@@ -66,5 +66,6 @@ public interface InitialContextFactory
* @return the new initial context
* @throws NamingException if the naming exception has occured
*/
- Context getInitialContext(Hashtable environment) throws NamingException;
+ Context getInitialContext (Hashtable<?, ?> environment)
+ throws NamingException;
}
diff --git a/javax/naming/spi/InitialContextFactoryBuilder.java b/javax/naming/spi/InitialContextFactoryBuilder.java
index 4696cecb8..31bafe6dc 100644
--- a/javax/naming/spi/InitialContextFactoryBuilder.java
+++ b/javax/naming/spi/InitialContextFactoryBuilder.java
@@ -53,14 +53,14 @@ import javax.naming.NamingException;
public interface InitialContextFactoryBuilder
{
/**
- * Create the new inital context factory
+ * Create the new initial context factory
*
- * @param environment the properties, used for creation of the initial context
- * factory. The parameter is owned by the caller: it is safe to reuse
- * the table for other purposes after the method returns.
+ * @param environment the properties, used for creation of the initial
+ * context factory. The parameter is owned by the caller: it is safe to reuse
+ * the table for other purposes after the method returns.
* @return the created initial context factory, never null.
* @throws NamingException on failure
*/
- InitialContextFactory createInitialContextFactory (Hashtable environment)
+ InitialContextFactory createInitialContextFactory (Hashtable<?, ?> environment)
throws NamingException;
}
diff --git a/javax/naming/spi/NamingManager.java b/javax/naming/spi/NamingManager.java
index 67c8e3510..3dfba0f66 100644
--- a/javax/naming/spi/NamingManager.java
+++ b/javax/naming/spi/NamingManager.java
@@ -79,7 +79,7 @@ public class NamingManager
NamingManager ()
{
}
-
+
/**
* Checks if the initial context factory builder has been set.
*
@@ -110,7 +110,7 @@ public class NamingManager
* class, named by this property, cannot be instantiated.
* @throws NamingException if throws by the context factory
*/
- public static Context getInitialContext (Hashtable environment)
+ public static Context getInitialContext (Hashtable<?, ?> environment)
throws NamingException
{
InitialContextFactory icf = null;
@@ -151,7 +151,7 @@ public class NamingManager
return icf.getInitialContext (environment);
}
-
+
/**
* <p>
* Creates the URL context for the given URL scheme id.
@@ -187,7 +187,7 @@ public class NamingManager
* @throws NamingException if thrown by the factory when creating the context.
*/
static Context getURLContext(Object refInfo, Name name, Context nameCtx,
- String scheme, Hashtable environment)
+ String scheme, Hashtable<?,?> environment)
throws NamingException
{
// Doc specifies com.sun.jndi.url as the final destination, but we cannot
@@ -196,17 +196,17 @@ public class NamingManager
// The final default location, as specified in the documentation.
String finalPrefix = "com.sun.jndi.url";
-
+
StringBuffer allPrefixes = new StringBuffer();
String prefixes;
- if (environment != null)
- {
+ if (environment != null)
+ {
prefixes = (String) environment.get(Context.URL_PKG_PREFIXES);
if (prefixes != null)
allPrefixes.append(prefixes);
- }
-
+ }
+
prefixes = System.getProperty(Context.URL_PKG_PREFIXES);
if (prefixes != null)
{
@@ -221,11 +221,11 @@ public class NamingManager
allPrefixes.append(':');
allPrefixes.append(finalPrefix);
- scheme = scheme + "." + scheme + "URLContextFactory";
-
+ scheme = scheme + "." + scheme + "URLContextFactory";
+
StringTokenizer tokens = new StringTokenizer(allPrefixes.toString(), ":");
while (tokens.hasMoreTokens())
- {
+ {
String aTry = tokens.nextToken();
try
{
@@ -277,11 +277,11 @@ public class NamingManager
{
// Anything from getObjectInstance.
}
- }
-
+ }
+
return null;
}
-
+
/**
* Load the class with the given name. This method tries to use the context
* class loader first. If this fails, it searches for the suitable class
@@ -329,15 +329,15 @@ public class NamingManager
* </p>
* <p>
* The class name of the factory that creates the context has the naming
- * pattern scheme-idURLContextFactory. For instance, the factory for the "ftp"
- * sheme should be named "ftpURLContextFactory". The Context.URL_PKG_PREFIXES
- * environment property contains the colon-separated list of the possible
- * package prefixes. The package name is constructed concatenating the package
- * prefix with the scheme id.
+ * pattern scheme-idURLContextFactory. For instance, the factory for the
+ * "ftp" scheme should be named "ftpURLContextFactory".
+ * The Context.URL_PKG_PREFIXES environment property contains the
+ * colon-separated list of the possible package prefixes. The package name
+ * is constructed by concatenating the package prefix with the scheme id.
* </p>
* <p>
- * If the factory class cannot be found in the specified packages, system will
- * try to use the default internal factory for the given scheme.
+ * If the factory class cannot be found in the specified packages, the
+ * system will try to use the default internal factory for the given scheme.
* </p>
* <p>
* After the factory is instantiated, its method
@@ -345,13 +345,14 @@ public class NamingManager
* is called to create and return the object instance.
*
* @param scheme the url scheme that must be supported by the given context
- * @param environment the properties for creating the factory and context (may
- * be null)
+ * @param environment the properties for creating the factory and context
+ * (may be null)
* @return the created context
- * @throws NamingException if thrown by the factory when creating the context.
+ * @throws NamingException if thrown by the factory when creating the
+ * context.
*/
public static Context getURLContext (String scheme,
- Hashtable environment)
+ Hashtable<?, ?> environment)
throws NamingException
{
return getURLContext (null, null, null, scheme, environment);
@@ -450,7 +451,7 @@ public class NamingManager
public static Object getObjectInstance (Object refInfo,
Name name,
Context nameCtx,
- Hashtable environment)
+ Hashtable<?, ?> environment)
throws Exception
{
ObjectFactory factory = null;
@@ -623,7 +624,7 @@ public class NamingManager
* @throws NamingException
*/
public static Object getStateToBind (Object obj, Name name,
- Context nameCtx, Hashtable environment)
+ Context nameCtx, Hashtable<?, ?> environment)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
diff --git a/javax/naming/spi/ObjectFactory.java b/javax/naming/spi/ObjectFactory.java
index 27771b6cb..4534481a7 100644
--- a/javax/naming/spi/ObjectFactory.java
+++ b/javax/naming/spi/ObjectFactory.java
@@ -70,6 +70,7 @@ public interface ObjectFactory
*
* @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
*/
- Object getObjectInstance(Object refObj, Name name, Context nameCtx,
- Hashtable environment) throws Exception;
+ Object getObjectInstance (Object refObj, Name name, Context nameCtx,
+ Hashtable<?, ?> environment)
+ throws Exception;
}
diff --git a/javax/naming/spi/ObjectFactoryBuilder.java b/javax/naming/spi/ObjectFactoryBuilder.java
index cb20c666e..6a528b17a 100644
--- a/javax/naming/spi/ObjectFactoryBuilder.java
+++ b/javax/naming/spi/ObjectFactoryBuilder.java
@@ -52,7 +52,7 @@ import javax.naming.Referenceable;
* @author Warren Levy (warrenl@redhat.com)
*/
public interface ObjectFactoryBuilder
-{
+{
/**
* Create a new object using the supplied environment.
*
@@ -65,6 +65,6 @@ public interface ObjectFactoryBuilder
* @throws NamingException
*/
ObjectFactory createObjectFactory(Object refInfo,
- Hashtable environment)
+ Hashtable<?, ?> environment)
throws NamingException;
}
diff --git a/javax/naming/spi/Resolver.java b/javax/naming/spi/Resolver.java
index eb3eeb560..f01790502 100644
--- a/javax/naming/spi/Resolver.java
+++ b/javax/naming/spi/Resolver.java
@@ -44,41 +44,20 @@ import javax.naming.NamingException;
import javax.naming.NotContextException;
/**
- * <p>Represents the object, capable for the at least partial name resolution.
- * The object is not necessay capable for the complete name resolution and
- * need not implement the {@link Context}.</p>
- * <p>
- * Both passed parameters and returned results are owned by the caller.</p>
- *
++ * <p>Represents the object, capable for the at least partial name resolution.
++ * The object is not necessay capable for the complete name resolution and
++ * need not implement the {@link Context}.</p>
++ * <p>
++ * Both passed parameters and returned results are owned by the caller.</p>
++ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface Resolver
{
- /**
- * Partially resolve the name, stopping at the first instance of the context
- * that is an instance of the contextType
- *
- * @param name the name to resolve
- * @param contextType the class of the context, on that the resolution should
- * be terminated
- * @return the complete or partial name resolution
- * @throws NotContextException if the context of the contextType is not found
- * @throws NamingException on other failure
- */
- ResolveResult resolveToClass(Name name, Class contextType)
+ ResolveResult resolveToClass(Name name,
+ Class<? extends Context> contextType)
throws NamingException;
-
- /**
- * Partially resolve the name, stopping at the first instance of the context
- * that is an instance of the contextType
- *
- * @param name the name to resolve
- * @param contextType the class of the context, on that the resolution should
- * be terminated
- * @return the complete or partial name resolution
- * @throws NotContextException if the context of the contextType is not found
- * @throws NamingException on other failure
- */
- ResolveResult resolveToClass(String name, Class contextType)
+ ResolveResult resolveToClass(String name,
+ Class<? extends Context> contextType)
throws NamingException;
}
diff --git a/javax/naming/spi/StateFactory.java b/javax/naming/spi/StateFactory.java
index 5694f8a1a..0c48309e3 100644
--- a/javax/naming/spi/StateFactory.java
+++ b/javax/naming/spi/StateFactory.java
@@ -75,5 +75,5 @@ public interface StateFactory
* @see DirectoryManager#getStateToBind
*/
Object getStateToBind(Object obj, Name name, Context nameCtx,
- Hashtable environment) throws NamingException;
+ Hashtable<?, ?> environment) throws NamingException;
}