logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1608337 - /logging/log4j/log4j2/branches/messaging-module/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
Date Mon, 07 Jul 2014 04:43:05 GMT
Author: mattsicker
Date: Mon Jul  7 04:43:04 2014
New Revision: 1608337

URL: http://svn.apache.org/r1608337
Log:
Add javadoc for JndiManager.

Modified:
    logging/log4j/log4j2/branches/messaging-module/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java

Modified: logging/log4j/log4j2/branches/messaging-module/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/messaging-module/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java?rev=1608337&r1=1608336&r2=1608337&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/messaging-module/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
(original)
+++ logging/log4j/log4j2/branches/messaging-module/log4j-mom/src/main/java/org/apache/logging/log4j/mom/jms/manager/JndiManager.java
Mon Jul  7 04:43:04 2014
@@ -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 Abstrac
         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 Abstrac
         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);



Mime
View raw message