You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/09/06 06:58:45 UTC

[12/29] git commit: Add javadoc for JndiManager.

Add javadoc for JndiManager.

git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/log4j2/branches/messaging-module@1608337 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/08e3f128
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/08e3f128
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/08e3f128

Branch: refs/heads/master
Commit: 08e3f128366996586cfa7706c5f8060b1ef955fd
Parents: 30ef692
Author: mattsicker <ma...@unknown>
Authored: Mon Jul 7 04:43:04 2014 +0000
Committer: mattsicker <ma...@unknown>
Committed: Mon Jul 7 04:43:04 2014 +0000

----------------------------------------------------------------------
 .../log4j/mom/jms/manager/JndiManager.java      | 22 +++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/08e3f128/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
----------------------------------------------------------------------
diff --git a/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java b/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
index 9399540..f56e28f 100644
--- a/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
+++ b/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
@@ -17,7 +17,6 @@
 package org.apache.logging.log4j.mom.jms.manager;
 
 import java.util.Properties;
-
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
@@ -44,6 +43,19 @@ public class JndiManager extends AbstractManager {
         this.context = context;
     }
 
+    /**
+     * Gets a JndiManager with the provided configuration information.
+     *
+     * @param initialContextFactoryName Fully qualified class name of an implementation of
+     *                                  {@link javax.naming.spi.InitialContextFactory}.
+     * @param providerURL               The provider URL to use for the JNDI connection (specific to the above factory).
+     * @param urlPkgPrefixes            A colon-separated list of package prefixes for the class name of the factory
+     *                                  class that will create a URL context factory
+     * @param securityPrincipal         The name of the identity of the Principal.
+     * @param securityCredentials       The security credentials of the Principal.
+     * @param additionalProperties      Any additional JNDI environment properties to set or {@code null} for none.
+     * @return the JndiManager for the provided parameters.
+     */
     public static JndiManager getJndiManager(final String initialContextFactoryName,
                                              final String providerURL,
                                              final String urlPkgPrefixes,
@@ -85,6 +97,14 @@ public class JndiManager extends AbstractManager {
         Closer.closeSilently(this.context);
     }
 
+    /**
+     * Looks up a named object through this JNDI context.
+     *
+     * @param name name of the object to look up.
+     * @param <T>  the type of the object.
+     * @return the named object if it could be located.
+     * @throws NamingException
+     */
     @SuppressWarnings("unchecked")
     public <T> T lookup(final String name) throws NamingException {
         return (T) this.context.lookup(name);