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.appender
Class AbstractManager

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

Direct Known Subclasses:
  AbstractDatabaseManager, JmsManager, JndiManager, OutputStreamManager, SmtpManager

    public abstract class AbstractManager

extends Object

Abstract base class used to register managers.

Field Summary
`protected int` | `count` Number of Appenders using this manager.
`protected static org.apache.logging.log4j.Logger` | `LOGGER` Allow subclasses access to the status logger without creating another instance.

Constructor Summary
`protected` | `AbstractManager(String name)`

Method Summary
`Map<String,String>` | `getContentFormat()` Provide a description of the content format supported by this Manager.
`protected int` | `getCount()`
`static
`<M extends AbstractManager,T> M`
` | `getManager(String name, ManagerFactory<M,T> factory, T data)` Retrieves a Manager if it has been previously created or creates a new Manager.
`String` | `getName()` Returns the name of the Manager.
`static boolean` | `hasManager(String name)` Determines if a Manager with the specified name exists.
`void` | `release()` Called to signify that this Manager is no longer required by an Appender.
`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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LOGGER

    protected static final org.apache.logging.log4j.Logger LOGGER

  Allow subclasses access to the status logger without creating another instance.

### count

    protected int count

  Number of Appenders using this manager.

Constructor Detail

### AbstractManager

    protected AbstractManager(String name)

Method Detail

### getManager

    public static <M extends AbstractManager,T> M getManager(String name,
                                                             ManagerFactory<M,T> factory,
                                                             T data)

  Retrieves a Manager if it has been previously created or creates a new Manager.

  Type Parameters:
    `M` - The Type of the Manager to be created.
    `T` - The type of the Factory data.
  Parameters:
    `name` - The name of the Manager to retrieve.
    `factory` - The Factory to use to create the Manager.
    `data` - An Object that should be passed to the factory when creating the Manager.
  Returns:
    A Manager with the specified name and type.

### hasManager

    public static boolean hasManager(String name)

  Determines if a Manager with the specified name exists.

  Parameters:
    `name` - The name of the Manager.
  Returns:
    True if the Manager exists, false otherwise.

### releaseSub

    protected void releaseSub()

  May be overridden by Managers to perform processing while the Manager is being released and the lock is held.

### getCount

    protected int getCount()

### release

    public void release()

  Called to signify that this Manager is no longer required by an Appender.

### getName

    public String getName()

  Returns the name of the Manager.

  Returns:
    The name of the Manager.

### getContentFormat

    public Map<String,String> getContentFormat()

  Provide a description of the content format supported by this Manager. Default implementation returns an empty (unspecified) Map.

  Returns:
    a Map of key/value pairs describing the Manager-specific content format, or an empty Map if no content format descriptors are specified.

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.