Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.core.net
Class JndiManager

    java.lang.Object
      org.apache.logging.log4j.core.appender.AbstractManager
          org.apache.logging.log4j.core.net.JndiManager

    public class JndiManager

extends AbstractManager

JNDI `Context` manager.

Since:
  2.1

Field Summary

Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
`count, LOGGER`

Method Summary
`static JndiManager` | `getDefaultManager()` Gets the default JndiManager using the default `InitialContext`.
`static JndiManager` | `getDefaultManager(String name)` Gets a named JndiManager using the default `InitialContext`.
`static JndiManager` | `getJndiManager(String initialContextFactoryName, String providerURL, String urlPkgPrefixes, String securityPrincipal, String securityCredentials, Properties additionalProperties)` Gets a JndiManager with the provided configuration information.
`
`<T> T`
` | `lookup(String name)` Looks up a named object through this JNDI context.
`protected void` | `releaseSub()` May be overridden by Managers to perform processing while the Manager is being released and the lock is held.

Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
`getContentFormat, getCount, getManager, getName, hasManager, release`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getDefaultManager

    public static JndiManager getDefaultManager()

  Gets the default JndiManager using the default `InitialContext`.

  Returns:
    the default JndiManager

### getDefaultManager

    public static JndiManager getDefaultManager(String name)

  Gets a named JndiManager using the default `InitialContext`.

  Parameters:
    `name` - the name of the JndiManager instance to create or use if available
  Returns:
    a default JndiManager

### getJndiManager

    public static JndiManager getJndiManager(String initialContextFactoryName,
                                             String providerURL,
                                             String urlPkgPrefixes,
                                             String securityPrincipal,
                                             String securityCredentials,
                                             Properties additionalProperties)

  Gets a JndiManager with the provided configuration information.

  Parameters:
    `initialContextFactoryName` - Fully qualified class name of an implementation of `InitialContextFactory`.
    `providerURL` - The provider URL to use for the JNDI connection (specific to the above factory).
    `urlPkgPrefixes` - A colon-separated list of package prefixes for the class name of the factory class that will create a URL context factory
    `securityPrincipal` - The name of the identity of the Principal.
    `securityCredentials` - The security credentials of the Principal.
    `additionalProperties` - Any additional JNDI environment properties to set or `null` for none.
  Returns:
    the JndiManager for the provided parameters.

### releaseSub

    protected void releaseSub()

  Description copied from class: `AbstractManager`
  May be overridden by Managers to perform processing while the Manager is being released and the lock is held.

  Overrides:
    `releaseSub` in class `AbstractManager`

### lookup

    public <T> T lookup(String name)
             throws NamingException

  Looks up a named object through this JNDI context.

  Type Parameters:
    `T` - the type of the object.
  Parameters:
    `name` - name of the object to look up.
  Returns:
    the named object if it could be located.
  Throws:
    `NamingException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.