This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 27c8fd1d9b Drop cut and paste javadocs
27c8fd1d9b is described below
commit 27c8fd1d9b4db71293924c4dfb4dbc0627bb5169
Author: remm <[email protected]>
AuthorDate: Tue May 7 10:37:19 2024 +0200
Drop cut and paste javadocs
And some cleanups.
---
java/org/apache/naming/AbstractRef.java | 7 -
java/org/apache/naming/NameParserImpl.java | 10 -
java/org/apache/naming/NamingContext.java | 319 --------------------
.../naming/NamingContextBindingsEnumeration.java | 9 -
.../apache/naming/NamingContextEnumeration.java | 9 -
java/org/apache/naming/SelectorContext.java | 329 ---------------------
java/org/apache/naming/factory/BeanFactory.java | 5 +
.../naming/factory/DataSourceLinkFactory.java | 5 -
java/org/apache/naming/factory/FactoryBase.java | 5 -
java/org/apache/naming/factory/LookupFactory.java | 5 +
.../apache/naming/factory/MailSessionFactory.java | 14 -
java/org/apache/naming/factory/OpenEjbFactory.java | 5 +
.../apache/naming/factory/ResourceLinkFactory.java | 8 +-
.../apache/naming/java/javaURLContextFactory.java | 13 +-
14 files changed, 33 insertions(+), 710 deletions(-)
diff --git a/java/org/apache/naming/AbstractRef.java
b/java/org/apache/naming/AbstractRef.java
index e9a657b784..a01ec9b212 100644
--- a/java/org/apache/naming/AbstractRef.java
+++ b/java/org/apache/naming/AbstractRef.java
@@ -37,10 +37,6 @@ public abstract class AbstractRef extends Reference {
}
- /**
- * Retrieves the class name of the factory of the object to which this
- * reference refers.
- */
@Override
public final String getFactoryClassName() {
String factory = super.getFactoryClassName();
@@ -60,9 +56,6 @@ public abstract class AbstractRef extends Reference {
protected abstract String getDefaultFactoryClassName();
- /**
- * Return a String rendering of this object.
- */
@Override
public final String toString() {
StringBuilder sb = new StringBuilder(this.getClass().getSimpleName());
diff --git a/java/org/apache/naming/NameParserImpl.java
b/java/org/apache/naming/NameParserImpl.java
index 9b6e4d38fe..f2650da31c 100644
--- a/java/org/apache/naming/NameParserImpl.java
+++ b/java/org/apache/naming/NameParserImpl.java
@@ -30,19 +30,9 @@ public class NameParserImpl
implements NameParser {
- // ----------------------------------------------------- Instance Variables
-
-
// ----------------------------------------------------- NameParser Methods
- /**
- * Parses a name into its components.
- *
- * @param name The non-null string name to parse
- * @return A non-null parsed form of the name using the naming convention
- * of this parser.
- */
@Override
public Name parse(String name)
throws NamingException {
diff --git a/java/org/apache/naming/NamingContext.java
b/java/org/apache/naming/NamingContext.java
index 2cae5f14d7..33b3f4caec 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -142,16 +142,6 @@ public class NamingContext implements Context {
// -------------------------------------------------------- Context Methods
- /**
- * Retrieves the named object. If name is empty, returns a new instance
- * of this context (which represents the same naming context as this
- * context, but its environment may be modified independently and it may
- * be accessed concurrently).
- *
- * @param name the name of the object to look up
- * @return the object bound to name
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Object lookup(Name name)
throws NamingException {
@@ -159,13 +149,6 @@ public class NamingContext implements Context {
}
- /**
- * Retrieves the named object.
- *
- * @param name the name of the object to look up
- * @return the object bound to name
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Object lookup(String name)
throws NamingException {
@@ -173,18 +156,6 @@ public class NamingContext implements Context {
}
- /**
- * Binds a name to an object. All intermediate contexts and the target
- * context (that named by all but terminal atomic component of the name)
- * must already exist.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @exception NameAlreadyBoundException if name is already bound
- * @exception javax.naming.directory.InvalidAttributesException if object
- * did not supply all mandatory attributes
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void bind(Name name, Object obj)
throws NamingException {
@@ -192,16 +163,6 @@ public class NamingContext implements Context {
}
- /**
- * Binds a name to an object.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @exception NameAlreadyBoundException if name is already bound
- * @exception javax.naming.directory.InvalidAttributesException if object
- * did not supply all mandatory attributes
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void bind(String name, Object obj)
throws NamingException {
@@ -209,21 +170,6 @@ public class NamingContext implements Context {
}
- /**
- * Binds a name to an object, overwriting any existing binding. All
- * intermediate contexts and the target context (that named by all but
- * terminal atomic component of the name) must already exist.
- * <p>
- * If the object is a DirContext, any existing attributes associated with
- * the name are replaced with those of the object. Otherwise, any
- * existing attributes associated with the name remain unchanged.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @exception javax.naming.directory.InvalidAttributesException if object
- * did not supply all mandatory attributes
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void rebind(Name name, Object obj)
throws NamingException {
@@ -231,15 +177,6 @@ public class NamingContext implements Context {
}
- /**
- * Binds a name to an object, overwriting any existing binding.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @exception javax.naming.directory.InvalidAttributesException if object
- * did not supply all mandatory attributes
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void rebind(String name, Object obj)
throws NamingException {
@@ -247,20 +184,6 @@ public class NamingContext implements Context {
}
- /**
- * Unbinds the named object. Removes the terminal atomic name in name
- * from the target context--that named by all but the terminal atomic
- * part of name.
- * <p>
- * This method is idempotent. It succeeds even if the terminal atomic
- * name is not bound in the target context, but throws
- * NameNotFoundException if any of the intermediate contexts do not exist.
- *
- * @param name the name to bind; may not be empty
- * @exception NameNotFoundException if an intermediate context does not
- * exist
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void unbind(Name name) throws NamingException {
@@ -297,14 +220,6 @@ public class NamingContext implements Context {
}
- /**
- * Unbinds the named object.
- *
- * @param name the name to bind; may not be empty
- * @exception NameNotFoundException if an intermediate context does not
- * exist
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void unbind(String name)
throws NamingException {
@@ -312,17 +227,6 @@ public class NamingContext implements Context {
}
- /**
- * Binds a new name to the object bound to an old name, and unbinds the
- * old name. Both names are relative to this context. Any attributes
- * associated with the old name become associated with the new name.
- * Intermediate contexts of the old name are not changed.
- *
- * @param oldName the name of the existing binding; may not be empty
- * @param newName the name of the new binding; may not be empty
- * @exception NameAlreadyBoundException if newName is already bound
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void rename(Name oldName, Name newName)
throws NamingException {
@@ -332,15 +236,6 @@ public class NamingContext implements Context {
}
- /**
- * Binds a new name to the object bound to an old name, and unbinds the
- * old name.
- *
- * @param oldName the name of the existing binding; may not be empty
- * @param newName the name of the new binding; may not be empty
- * @exception NameAlreadyBoundException if newName is already bound
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void rename(String oldName, String newName)
throws NamingException {
@@ -348,19 +243,6 @@ public class NamingContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the class
- * names of objects bound to them. The contents of any subcontexts are
- * not included.
- * <p>
- * If a binding is added to or removed from this context, its effect on
- * an enumeration previously returned is undefined.
- *
- * @param name the name of the context to list
- * @return an enumeration of the names and class names of the bindings in
- * this context. Each element of the enumeration is of type NameClassPair.
- * @exception NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<NameClassPair> list(Name name)
throws NamingException {
@@ -387,15 +269,6 @@ public class NamingContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the class
- * names of objects bound to them.
- *
- * @param name the name of the context to list
- * @return an enumeration of the names and class names of the bindings in
- * this context. Each element of the enumeration is of type NameClassPair.
- * @exception NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<NameClassPair> list(String name)
throws NamingException {
@@ -403,19 +276,6 @@ public class NamingContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the
- * objects bound to them. The contents of any subcontexts are not
- * included.
- * <p>
- * If a binding is added to or removed from this context, its effect on
- * an enumeration previously returned is undefined.
- *
- * @param name the name of the context to list
- * @return an enumeration of the bindings in this context.
- * Each element of the enumeration is of type Binding.
- * @exception NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<Binding> listBindings(Name name)
throws NamingException {
@@ -442,15 +302,6 @@ public class NamingContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the
- * objects bound to them.
- *
- * @param name the name of the context to list
- * @return an enumeration of the bindings in this context.
- * Each element of the enumeration is of type Binding.
- * @exception NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<Binding> listBindings(String name)
throws NamingException {
@@ -458,31 +309,6 @@ public class NamingContext implements Context {
}
- /**
- * Destroys the named context and removes it from the namespace. Any
- * attributes associated with the name are also removed. Intermediate
- * contexts are not destroyed.
- * <p>
- * This method is idempotent. It succeeds even if the terminal atomic
- * name is not bound in the target context, but throws
- * NameNotFoundException if any of the intermediate contexts do not exist.
- *
- * In a federated naming system, a context from one naming system may be
- * bound to a name in another. One can subsequently look up and perform
- * operations on the foreign context using a composite name. However, an
- * attempt destroy the context using this composite name will fail with
- * NotContextException, because the foreign context is not a "subcontext"
- * of the context in which it is bound. Instead, use unbind() to remove
- * the binding of the foreign context. Destroying the foreign context
- * requires that the destroySubcontext() be performed on a context from
- * the foreign context's "native" naming system.
- *
- * @param name the name of the context to be destroyed; may not be empty
- * @exception NameNotFoundException if an intermediate context does not
- * exist
- * @exception NotContextException if the name is bound but does not name
- * a context, or does not name a context of the appropriate type
- */
@Override
public void destroySubcontext(Name name) throws NamingException {
@@ -525,15 +351,6 @@ public class NamingContext implements Context {
}
- /**
- * Destroys the named context and removes it from the namespace.
- *
- * @param name the name of the context to be destroyed; may not be empty
- * @exception NameNotFoundException if an intermediate context does not
- * exist
- * @exception NotContextException if the name is bound but does not name
- * a context, or does not name a context of the appropriate type
- */
@Override
public void destroySubcontext(String name)
throws NamingException {
@@ -541,19 +358,6 @@ public class NamingContext implements Context {
}
- /**
- * Creates and binds a new context. Creates a new context with the given
- * name and binds it in the target context (that named by all but
- * terminal atomic component of the name). All intermediate contexts and
- * the target context must already exist.
- *
- * @param name the name of the context to create; may not be empty
- * @return the newly created context
- * @exception NameAlreadyBoundException if name is already bound
- * @exception javax.naming.directory.InvalidAttributesException if creation
- * of the sub-context requires specification of mandatory attributes
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Context createSubcontext(Name name) throws NamingException {
if (!checkWritable()) {
@@ -569,16 +373,6 @@ public class NamingContext implements Context {
}
- /**
- * Creates and binds a new context.
- *
- * @param name the name of the context to create; may not be empty
- * @return the newly created context
- * @exception NameAlreadyBoundException if name is already bound
- * @exception javax.naming.directory.InvalidAttributesException if creation
- * of the sub-context requires specification of mandatory attributes
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Context createSubcontext(String name)
throws NamingException {
@@ -586,16 +380,6 @@ public class NamingContext implements Context {
}
- /**
- * Retrieves the named object, following links except for the terminal
- * atomic component of the name. If the object bound to name is not a
- * link, returns the object itself.
- *
- * @param name the name of the object to look up
- * @return the object bound to name, not following the terminal link
- * (if any).
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Object lookupLink(Name name)
throws NamingException {
@@ -603,15 +387,6 @@ public class NamingContext implements Context {
}
- /**
- * Retrieves the named object, following links except for the terminal
- * atomic component of the name.
- *
- * @param name the name of the object to look up
- * @return the object bound to name, not following the terminal link
- * (if any).
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Object lookupLink(String name)
throws NamingException {
@@ -619,20 +394,6 @@ public class NamingContext implements Context {
}
- /**
- * Retrieves the parser associated with the named context. In a
- * federation of namespaces, different naming systems will parse names
- * differently. This method allows an application to get a parser for
- * parsing names into their atomic components using the naming convention
- * of a particular naming system. Within any single naming system,
- * NameParser objects returned by this method must be equal (using the
- * equals() test).
- *
- * @param name the name of the context from which to get the parser
- * @return a name parser that can parse compound names into their atomic
- * components
- * @exception NamingException if a naming exception is encountered
- */
@Override
public NameParser getNameParser(Name name)
throws NamingException {
@@ -659,14 +420,6 @@ public class NamingContext implements Context {
}
- /**
- * Retrieves the parser associated with the named context.
- *
- * @param name the name of the context from which to get the parser
- * @return a name parser that can parse compound names into their atomic
- * components
- * @exception NamingException if a naming exception is encountered
- */
@Override
public NameParser getNameParser(String name)
throws NamingException {
@@ -674,21 +427,6 @@ public class NamingContext implements Context {
}
- /**
- * Composes the name of this context with a name relative to this context.
- * <p>
- * Given a name (name) relative to this context, and the name (prefix)
- * of this context relative to one of its ancestors, this method returns
- * the composition of the two names using the syntax appropriate for the
- * naming system(s) involved. That is, if name names an object relative
- * to this context, the result is the name of the same object, but
- * relative to the ancestor context. None of the names may be null.
- *
- * @param name a name relative to this context
- * @param prefix the name of this context relative to one of its ancestors
- * @return the composition of prefix and name
- * @exception NamingException if a naming exception is encountered
- */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
prefix = (Name) prefix.clone();
@@ -696,70 +434,30 @@ public class NamingContext implements Context {
}
- /**
- * Composes the name of this context with a name relative to this context.
- *
- * @param name a name relative to this context
- * @param prefix the name of this context relative to one of its ancestors
- * @return the composition of prefix and name
- */
@Override
public String composeName(String name, String prefix) {
return prefix + "/" + name;
}
- /**
- * Adds a new environment property to the environment of this context. If
- * the property already exists, its value is overwritten.
- *
- * @param propName the name of the environment property to add; may not
- * be null
- * @param propVal the value of the property to add; may not be null
- */
@Override
public Object addToEnvironment(String propName, Object propVal) {
return env.put(propName, propVal);
}
- /**
- * Removes an environment property from the environment of this context.
- *
- * @param propName the name of the environment property to remove;
- * may not be null
- */
@Override
public Object removeFromEnvironment(String propName){
return env.remove(propName);
}
- /**
- * Retrieves the environment in effect for this context. See class
- * description for more details on environment properties.
- * The caller should not make any changes to the object returned: their
- * effect on the context is undefined. The environment of this context
- * may be changed using addToEnvironment() and removeFromEnvironment().
- *
- * @return the environment of this context; never null
- */
@Override
public Hashtable<?,?> getEnvironment() {
return env;
}
- /**
- * Closes this context. This method releases this context's resources
- * immediately, instead of waiting for them to be released automatically
- * by the garbage collector.
- * This method is idempotent: invoking it on a context that has already
- * been closed has no effect. Invoking any other method on a closed
- * context is not allowed, and results in undefined behaviour.
- *
- * @exception NamingException if a naming exception is encountered
- */
@Override
public void close() throws NamingException {
if (!checkWritable()) {
@@ -769,23 +467,6 @@ public class NamingContext implements Context {
}
- /**
- * Retrieves the full name of this context within its own namespace.
- * <p>
- * Many naming services have a notion of a "full name" for objects in
- * their respective namespaces. For example, an LDAP entry has a
- * distinguished name, and a DNS record has a fully qualified name. This
- * method allows the client application to retrieve this name. The string
- * returned by this method is not a JNDI composite name and should not be
- * passed directly to context methods. In naming systems for which the
- * notion of full name does not make sense,
- * OperationNotSupportedException is thrown.
- *
- * @return this context's name in its own namespace; never null
- * @exception OperationNotSupportedException if the naming system does
- * not have the notion of a full name
- * @exception NamingException if a naming exception is encountered
- */
@Override
public String getNameInNamespace()
throws NamingException {
diff --git a/java/org/apache/naming/NamingContextBindingsEnumeration.java
b/java/org/apache/naming/NamingContextBindingsEnumeration.java
index fa642bb232..0b939a8ec2 100644
--- a/java/org/apache/naming/NamingContextBindingsEnumeration.java
+++ b/java/org/apache/naming/NamingContextBindingsEnumeration.java
@@ -60,9 +60,6 @@ public class NamingContextBindingsEnumeration
// --------------------------------------------------------- Public Methods
- /**
- * Retrieves the next element in the enumeration.
- */
@Override
public Binding next()
throws NamingException {
@@ -70,9 +67,6 @@ public class NamingContextBindingsEnumeration
}
- /**
- * Determines whether there are any more elements in the enumeration.
- */
@Override
public boolean hasMore()
throws NamingException {
@@ -80,9 +74,6 @@ public class NamingContextBindingsEnumeration
}
- /**
- * Closes this enumeration.
- */
@Override
public void close()
throws NamingException {
diff --git a/java/org/apache/naming/NamingContextEnumeration.java
b/java/org/apache/naming/NamingContextEnumeration.java
index de579c9476..e2c8fd7e00 100644
--- a/java/org/apache/naming/NamingContextEnumeration.java
+++ b/java/org/apache/naming/NamingContextEnumeration.java
@@ -51,9 +51,6 @@ public class NamingContextEnumeration
// --------------------------------------------------------- Public Methods
- /**
- * Retrieves the next element in the enumeration.
- */
@Override
public NameClassPair next()
throws NamingException {
@@ -61,9 +58,6 @@ public class NamingContextEnumeration
}
- /**
- * Determines whether there are any more elements in the enumeration.
- */
@Override
public boolean hasMore()
throws NamingException {
@@ -71,9 +65,6 @@ public class NamingContextEnumeration
}
- /**
- * Closes this enumeration.
- */
@Override
public void close()
throws NamingException {
diff --git a/java/org/apache/naming/SelectorContext.java
b/java/org/apache/naming/SelectorContext.java
index 3675b4e1e4..af2a2d12f2 100644
--- a/java/org/apache/naming/SelectorContext.java
+++ b/java/org/apache/naming/SelectorContext.java
@@ -113,16 +113,6 @@ public class SelectorContext implements Context {
// -------------------------------------------------------- Context Methods
- /**
- * Retrieves the named object. If name is empty, returns a new instance
- * of this context (which represents the same naming context as this
- * context, but its environment may be modified independently and it may
- * be accessed concurrently).
- *
- * @param name the name of the object to look up
- * @return the object bound to name
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Object lookup(Name name)
throws NamingException {
@@ -139,13 +129,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the named object.
- *
- * @param name the name of the object to look up
- * @return the object bound to name
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Object lookup(String name)
throws NamingException {
@@ -162,19 +145,6 @@ public class SelectorContext implements Context {
}
- /**
- * Binds a name to an object. All intermediate contexts and the target
- * context (that named by all but terminal atomic component of the name)
- * must already exist.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @throws javax.naming.NameAlreadyBoundException if name is already
- * bound
- * @throws javax.naming.directory.InvalidAttributesException if object did
not
- * supply all mandatory attributes
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void bind(Name name, Object obj)
throws NamingException {
@@ -182,17 +152,6 @@ public class SelectorContext implements Context {
}
- /**
- * Binds a name to an object.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @throws javax.naming.NameAlreadyBoundException if name is already
- * bound
- * @throws javax.naming.directory.InvalidAttributesException if object did
not
- * supply all mandatory attributes
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void bind(String name, Object obj)
throws NamingException {
@@ -200,21 +159,6 @@ public class SelectorContext implements Context {
}
- /**
- * Binds a name to an object, overwriting any existing binding. All
- * intermediate contexts and the target context (that named by all but
- * terminal atomic component of the name) must already exist.
- * <p>
- * If the object is a DirContext, any existing attributes associated with
- * the name are replaced with those of the object. Otherwise, any
- * existing attributes associated with the name remain unchanged.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @throws javax.naming.directory.InvalidAttributesException if object did
not
- * supply all mandatory attributes
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void rebind(Name name, Object obj)
throws NamingException {
@@ -222,15 +166,6 @@ public class SelectorContext implements Context {
}
- /**
- * Binds a name to an object, overwriting any existing binding.
- *
- * @param name the name to bind; may not be empty
- * @param obj the object to bind; possibly null
- * @throws javax.naming.directory.InvalidAttributesException if object did
not
- * supply all mandatory attributes
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void rebind(String name, Object obj)
throws NamingException {
@@ -238,20 +173,6 @@ public class SelectorContext implements Context {
}
- /**
- * Unbinds the named object. Removes the terminal atomic name in name
- * from the target context--that named by all but the terminal atomic
- * part of name.
- * <p>
- * This method is idempotent. It succeeds even if the terminal atomic
- * name is not bound in the target context, but throws
- * NameNotFoundException if any of the intermediate contexts do not exist.
- *
- * @param name the name to bind; may not be empty
- * @throws javax.naming.NameNotFoundException if an intermediate context
- * does not exist
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void unbind(Name name)
throws NamingException {
@@ -259,14 +180,6 @@ public class SelectorContext implements Context {
}
- /**
- * Unbinds the named object.
- *
- * @param name the name to bind; may not be empty
- * @throws javax.naming.NameNotFoundException if an intermediate context
- * does not exist
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void unbind(String name)
throws NamingException {
@@ -274,18 +187,6 @@ public class SelectorContext implements Context {
}
- /**
- * Binds a new name to the object bound to an old name, and unbinds the
- * old name. Both names are relative to this context. Any attributes
- * associated with the old name become associated with the new name.
- * Intermediate contexts of the old name are not changed.
- *
- * @param oldName the name of the existing binding; may not be empty
- * @param newName the name of the new binding; may not be empty
- * @throws javax.naming.NameAlreadyBoundException if name is already
- * bound
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void rename(Name oldName, Name newName)
throws NamingException {
@@ -293,16 +194,6 @@ public class SelectorContext implements Context {
}
- /**
- * Binds a new name to the object bound to an old name, and unbinds the
- * old name.
- *
- * @param oldName the name of the existing binding; may not be empty
- * @param newName the name of the new binding; may not be empty
- * @throws javax.naming.NameAlreadyBoundException if name is already
- * bound
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void rename(String oldName, String newName)
throws NamingException {
@@ -310,19 +201,6 @@ public class SelectorContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the class
- * names of objects bound to them. The contents of any subcontexts are
- * not included.
- * <p>
- * If a binding is added to or removed from this context, its effect on
- * an enumeration previously returned is undefined.
- *
- * @param name the name of the context to list
- * @return an enumeration of the names and class names of the bindings in
- * this context. Each element of the enumeration is of type NameClassPair.
- * @throws NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<NameClassPair> list(Name name)
throws NamingException {
@@ -336,15 +214,6 @@ public class SelectorContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the class
- * names of objects bound to them.
- *
- * @param name the name of the context to list
- * @return an enumeration of the names and class names of the bindings in
- * this context. Each element of the enumeration is of type NameClassPair.
- * @throws NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<NameClassPair> list(String name)
throws NamingException {
@@ -358,19 +227,6 @@ public class SelectorContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the
- * objects bound to them. The contents of any subcontexts are not
- * included.
- * <p>
- * If a binding is added to or removed from this context, its effect on
- * an enumeration previously returned is undefined.
- *
- * @param name the name of the context to list
- * @return an enumeration of the bindings in this context.
- * Each element of the enumeration is of type Binding.
- * @throws NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<Binding> listBindings(Name name)
throws NamingException {
@@ -384,15 +240,6 @@ public class SelectorContext implements Context {
}
- /**
- * Enumerates the names bound in the named context, along with the
- * objects bound to them.
- *
- * @param name the name of the context to list
- * @return an enumeration of the bindings in this context.
- * Each element of the enumeration is of type Binding.
- * @throws NamingException if a naming exception is encountered
- */
@Override
public NamingEnumeration<Binding> listBindings(String name)
throws NamingException {
@@ -406,31 +253,6 @@ public class SelectorContext implements Context {
}
- /**
- * Destroys the named context and removes it from the namespace. Any
- * attributes associated with the name are also removed. Intermediate
- * contexts are not destroyed.
- * <p>
- * This method is idempotent. It succeeds even if the terminal atomic
- * name is not bound in the target context, but throws
- * NameNotFoundException if any of the intermediate contexts do not exist.
- *
- * In a federated naming system, a context from one naming system may be
- * bound to a name in another. One can subsequently look up and perform
- * operations on the foreign context using a composite name. However, an
- * attempt destroy the context using this composite name will fail with
- * NotContextException, because the foreign context is not a "subcontext"
- * of the context in which it is bound. Instead, use unbind() to remove
- * the binding of the foreign context. Destroying the foreign context
- * requires that the destroySubcontext() be performed on a context from
- * the foreign context's "native" naming system.
- *
- * @param name the name of the context to be destroyed; may not be empty
- * @throws javax.naming.NameNotFoundException if an intermediate context
- * does not exist
- * @throws javax.naming.NotContextException if the name is bound but does
- * not name a context, or does not name a context of the appropriate type
- */
@Override
public void destroySubcontext(Name name)
throws NamingException {
@@ -438,15 +260,6 @@ public class SelectorContext implements Context {
}
- /**
- * Destroys the named context and removes it from the namespace.
- *
- * @param name the name of the context to be destroyed; may not be empty
- * @throws javax.naming.NameNotFoundException if an intermediate context
- * does not exist
- * @throws javax.naming.NotContextException if the name is bound but does
- * not name a context, or does not name a context of the appropriate type
- */
@Override
public void destroySubcontext(String name)
throws NamingException {
@@ -454,20 +267,6 @@ public class SelectorContext implements Context {
}
- /**
- * Creates and binds a new context. Creates a new context with the given
- * name and binds it in the target context (that named by all but
- * terminal atomic component of the name). All intermediate contexts and
- * the target context must already exist.
- *
- * @param name the name of the context to create; may not be empty
- * @return the newly created context
- * @throws javax.naming.NameAlreadyBoundException if name is already
- * bound
- * @throws javax.naming.directory.InvalidAttributesException if creation
of the
- * sub-context requires specification of mandatory attributes
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Context createSubcontext(Name name)
throws NamingException {
@@ -475,17 +274,6 @@ public class SelectorContext implements Context {
}
- /**
- * Creates and binds a new context.
- *
- * @param name the name of the context to create; may not be empty
- * @return the newly created context
- * @throws javax.naming.NameAlreadyBoundException if name is already
- * bound
- * @throws javax.naming.directory.InvalidAttributesException if creation
of the
- * sub-context requires specification of mandatory attributes
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Context createSubcontext(String name)
throws NamingException {
@@ -493,16 +281,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the named object, following links except for the terminal
- * atomic component of the name. If the object bound to name is not a
- * link, returns the object itself.
- *
- * @param name the name of the object to look up
- * @return the object bound to name, not following the terminal link
- * (if any).
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Object lookupLink(Name name)
throws NamingException {
@@ -516,15 +294,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the named object, following links except for the terminal
- * atomic component of the name.
- *
- * @param name the name of the object to look up
- * @return the object bound to name, not following the terminal link
- * (if any).
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Object lookupLink(String name)
throws NamingException {
@@ -538,20 +307,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the parser associated with the named context. In a
- * federation of namespaces, different naming systems will parse names
- * differently. This method allows an application to get a parser for
- * parsing names into their atomic components using the naming convention
- * of a particular naming system. Within any single naming system,
- * NameParser objects returned by this method must be equal (using the
- * equals() test).
- *
- * @param name the name of the context from which to get the parser
- * @return a name parser that can parse compound names into their atomic
- * components
- * @throws NamingException if a naming exception is encountered
- */
@Override
public NameParser getNameParser(Name name)
throws NamingException {
@@ -559,14 +314,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the parser associated with the named context.
- *
- * @param name the name of the context from which to get the parser
- * @return a name parser that can parse compound names into their atomic
- * components
- * @throws NamingException if a naming exception is encountered
- */
@Override
public NameParser getNameParser(String name)
throws NamingException {
@@ -574,21 +321,6 @@ public class SelectorContext implements Context {
}
- /**
- * Composes the name of this context with a name relative to this context.
- * <p>
- * Given a name (name) relative to this context, and the name (prefix)
- * of this context relative to one of its ancestors, this method returns
- * the composition of the two names using the syntax appropriate for the
- * naming system(s) involved. That is, if name names an object relative
- * to this context, the result is the name of the same object, but
- * relative to the ancestor context. None of the names may be null.
- *
- * @param name a name relative to this context
- * @param prefix the name of this context relative to one of its ancestors
- * @return the composition of prefix and name
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Name composeName(Name name, Name prefix)
throws NamingException {
@@ -597,14 +329,6 @@ public class SelectorContext implements Context {
}
- /**
- * Composes the name of this context with a name relative to this context.
- *
- * @param name a name relative to this context
- * @param prefix the name of this context relative to one of its ancestors
- * @return the composition of prefix and name
- * @throws NamingException if a naming exception is encountered
- */
@Override
public String composeName(String name, String prefix)
throws NamingException {
@@ -612,15 +336,6 @@ public class SelectorContext implements Context {
}
- /**
- * Adds a new environment property to the environment of this context. If
- * the property already exists, its value is overwritten.
- *
- * @param propName the name of the environment property to add; may not
- * be null
- * @param propVal the value of the property to add; may not be null
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Object addToEnvironment(String propName, Object propVal)
throws NamingException {
@@ -628,13 +343,6 @@ public class SelectorContext implements Context {
}
- /**
- * Removes an environment property from the environment of this context.
- *
- * @param propName the name of the environment property to remove;
- * may not be null
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Object removeFromEnvironment(String propName)
throws NamingException {
@@ -642,16 +350,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the environment in effect for this context. See class
- * description for more details on environment properties.
- * The caller should not make any changes to the object returned: their
- * effect on the context is undefined. The environment of this context
- * may be changed using addToEnvironment() and removeFromEnvironment().
- *
- * @return the environment of this context; never null
- * @throws NamingException if a naming exception is encountered
- */
@Override
public Hashtable<?,?> getEnvironment()
throws NamingException {
@@ -659,16 +357,6 @@ public class SelectorContext implements Context {
}
- /**
- * Closes this context. This method releases this context's resources
- * immediately, instead of waiting for them to be released automatically
- * by the garbage collector.
- * This method is idempotent: invoking it on a context that has already
- * been closed has no effect. Invoking any other method on a closed
- * context is not allowed, and results in undefined behaviour.
- *
- * @throws NamingException if a naming exception is encountered
- */
@Override
public void close()
throws NamingException {
@@ -676,23 +364,6 @@ public class SelectorContext implements Context {
}
- /**
- * Retrieves the full name of this context within its own namespace.
- * <p>
- * Many naming services have a notion of a "full name" for objects in
- * their respective namespaces. For example, an LDAP entry has a
- * distinguished name, and a DNS record has a fully qualified name. This
- * method allows the client application to retrieve this name. The string
- * returned by this method is not a JNDI composite name and should not be
- * passed directly to context methods. In naming systems for which the
- * notion of full name does not make sense,
- * OperationNotSupportedException is thrown.
- *
- * @return this context's name in its own namespace; never null
- * @throws javax.naming.OperationNotSupportedException if the naming
- * system does not have the notion of a full name
- * @throws NamingException if a naming exception is encountered
- */
@Override
public String getNameInNamespace()
throws NamingException {
diff --git a/java/org/apache/naming/factory/BeanFactory.java
b/java/org/apache/naming/factory/BeanFactory.java
index b472446cc5..57f9785c61 100644
--- a/java/org/apache/naming/factory/BeanFactory.java
+++ b/java/org/apache/naming/factory/BeanFactory.java
@@ -96,6 +96,11 @@ public class BeanFactory implements ObjectFactory {
* Create a new Bean instance.
*
* @param obj The reference object describing the Bean
+ * @param name the bound name
+ * @param nameCtx unused
+ * @param environment unused
+ * @return the object instance
+ * @throws NamingException if an error occur creating the instance
*/
@Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx,
Hashtable<?,?> environment)
diff --git a/java/org/apache/naming/factory/DataSourceLinkFactory.java
b/java/org/apache/naming/factory/DataSourceLinkFactory.java
index 451961f9a8..8a1ceb6d03 100644
--- a/java/org/apache/naming/factory/DataSourceLinkFactory.java
+++ b/java/org/apache/naming/factory/DataSourceLinkFactory.java
@@ -44,11 +44,6 @@ public class DataSourceLinkFactory extends
ResourceLinkFactory {
// ------------------------------------------------- ObjectFactory Methods
- /**
- * Create a new DataSource instance.
- *
- * @param obj The reference object describing the DataSource
- */
@Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx,
Hashtable<?,?> environment)
throws NamingException {
diff --git a/java/org/apache/naming/factory/FactoryBase.java
b/java/org/apache/naming/factory/FactoryBase.java
index 292c5daef6..e5f8487627 100644
--- a/java/org/apache/naming/factory/FactoryBase.java
+++ b/java/org/apache/naming/factory/FactoryBase.java
@@ -35,11 +35,6 @@ public abstract class FactoryBase implements ObjectFactory {
private static final StringManager sm =
StringManager.getManager(FactoryBase.class);
- /**
- * Creates a new object instance.
- *
- * @param obj The reference object describing the object to create
- */
@Override
public final Object getObjectInstance(Object obj, Name name, Context
nameCtx,
Hashtable<?,?> environment) throws Exception {
diff --git a/java/org/apache/naming/factory/LookupFactory.java
b/java/org/apache/naming/factory/LookupFactory.java
index 672763d11b..a9e05f34db 100644
--- a/java/org/apache/naming/factory/LookupFactory.java
+++ b/java/org/apache/naming/factory/LookupFactory.java
@@ -47,6 +47,11 @@ public class LookupFactory implements ObjectFactory {
* Create a new Resource env instance.
*
* @param obj The reference object describing the DataSource
+ * @param name the bound name
+ * @param nameCtx unused
+ * @param environment unused
+ * @return the object instance
+ * @throws Exception if an error occur creating the instance
*/
@Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx,
diff --git a/java/org/apache/naming/factory/MailSessionFactory.java
b/java/org/apache/naming/factory/MailSessionFactory.java
index 70a8d2f266..c0c92e03fb 100644
--- a/java/org/apache/naming/factory/MailSessionFactory.java
+++ b/java/org/apache/naming/factory/MailSessionFactory.java
@@ -71,20 +71,6 @@ public class MailSessionFactory implements ObjectFactory {
protected static final String factoryType = "jakarta.mail.Session";
- /**
- * Create and return an object instance based on the specified
- * characteristics.
- *
- * @param refObj Reference information containing our parameters, or null
- * if there are no parameters
- * @param name The name of this object, relative to context, or null
- * if there is no name
- * @param context The context to which name is relative, or null if name
- * is relative to the default initial context
- * @param env Environment variables, or null if there are none
- *
- * @exception Exception if an error occurs during object creation
- */
@Override
public Object getObjectInstance(Object refObj, Name name, Context context,
Hashtable<?,?> env) throws Exception {
diff --git a/java/org/apache/naming/factory/OpenEjbFactory.java
b/java/org/apache/naming/factory/OpenEjbFactory.java
index 1c8e18efe2..788a01174e 100644
--- a/java/org/apache/naming/factory/OpenEjbFactory.java
+++ b/java/org/apache/naming/factory/OpenEjbFactory.java
@@ -51,6 +51,11 @@ public class OpenEjbFactory implements ObjectFactory {
* Create a new EJB instance using OpenEJB.
*
* @param obj The reference object describing the DataSource
+ * @param name the bound name
+ * @param nameCtx unused
+ * @param environment unused
+ * @return the object instance
+ * @throws Exception if an error occur creating the instance
*/
@Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx,
diff --git a/java/org/apache/naming/factory/ResourceLinkFactory.java
b/java/org/apache/naming/factory/ResourceLinkFactory.java
index 2cc863f16e..3c8dd8a6f0 100644
--- a/java/org/apache/naming/factory/ResourceLinkFactory.java
+++ b/java/org/apache/naming/factory/ResourceLinkFactory.java
@@ -113,9 +113,13 @@ public class ResourceLinkFactory implements ObjectFactory {
// -------------------------------------------------- ObjectFactory Methods
/**
- * Create a new DataSource instance.
+ * Create a new resource instance.
*
- * @param obj The reference object describing the DataSource
+ * @param name the bound name
+ * @param nameCtx unused
+ * @param environment unused
+ * @return the object instance
+ * @throws NamingException if an error occur creating the instance
*/
@Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx,
diff --git a/java/org/apache/naming/java/javaURLContextFactory.java
b/java/org/apache/naming/java/javaURLContextFactory.java
index 0eeacd8951..99ae388ee9 100644
--- a/java/org/apache/naming/java/javaURLContextFactory.java
+++ b/java/org/apache/naming/java/javaURLContextFactory.java
@@ -74,7 +74,14 @@ public class javaURLContextFactory
/**
- * Crete a new Context's instance.
+ * Create a new Context's instance.
+ * @param obj unused
+ * @param name unused
+ * @param nameCtx unused
+ * @param environment the environment used
+ * @return a selector context if the thread or classloader are bound, and
+ * null otherwise
+ * @throws NamingException not thrown by this implementationm
*/
@SuppressWarnings("unchecked")
@Override
@@ -91,6 +98,10 @@ public class javaURLContextFactory
/**
* Get a new (writable) initial context.
+ * @param environment the environment used
+ * @return a selector context if the thread or classloader are bound, and
+ * a shared writable context otherwise
+ * @throws NamingException not thrown by this implementationm
*/
@SuppressWarnings("unchecked")
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]