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

## org.apache.log4j.helpers
Class AppenderAttachableImpl

    java.lang.Object
      |
      +--org.apache.log4j.helpers.AppenderAttachableImpl

All Implemented Interfaces:
  AppenderAttachable

public class AppenderAttachableImpl
extends Object
implements AppenderAttachable

A straightforward implementation of the `AppenderAttachable` interface.

Since:
  version 0.9.1
Author:
  Ceki Gülcü

Field Summary
`protected Vector` | `appenderList` Array of appenders.

Constructor Summary
`AppenderAttachableImpl()`

Method Summary
`void` | `addAppender(Appender newAppender)` Attach an appender.
`int` | `appendLoopOnAppenders(LoggingEvent event)` Call the `doAppend` method on all attached appenders.
`Enumeration` | `getAllAppenders()` Get all attached appenders as an Enumeration.
`Appender` | `getAppender(String name)` Look for an attached appender named as `name`.
`boolean` | `isAttached(Appender appender)` Returns `true` if the specified appender is in the list of attached appenders, `false` otherwise.
`void` | `removeAllAppenders()` Remove and close all previously attached appenders.
`void` | `removeAppender(Appender appender)` Remove the appender passed as parameter form the list of attached appenders.
`void` | `removeAppender(String name)` Remove the appender with the name passed as parameter form the list of appenders.

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

Field Detail

### appenderList

    protected Vector appenderList

  Array of appenders.

Constructor Detail

### AppenderAttachableImpl

    public AppenderAttachableImpl()

Method Detail

### addAppender

    public void addAppender(Appender newAppender)

  Attach an appender. If the appender is already in the list in won't be added again.
  Specified by:
    `addAppender` in interface `AppenderAttachable`

### appendLoopOnAppenders

    public int appendLoopOnAppenders(LoggingEvent event)

  Call the `doAppend` method on all attached appenders.

### getAllAppenders

    public Enumeration getAllAppenders()

  Get all attached appenders as an Enumeration. If there are no attached appenders `null` is returned.
  Specified by:
    `getAllAppenders` in interface `AppenderAttachable`
  Returns:
    Enumeration An enumeration of attached appenders.

### getAppender

    public Appender getAppender(String name)

  Look for an attached appender named as `name`.

  Return the appender with that name if in the list. Return null otherwise.

  Specified by:
    `getAppender` in interface `AppenderAttachable`

### isAttached

    public boolean isAttached(Appender appender)

  Returns `true` if the specified appender is in the list of attached appenders, `false` otherwise.
  Specified by:
    `isAttached` in interface `AppenderAttachable`
  Since:
    1.2

### removeAllAppenders

    public void removeAllAppenders()

  Remove and close all previously attached appenders.
  Specified by:
    `removeAllAppenders` in interface `AppenderAttachable`

### removeAppender

    public void removeAppender(Appender appender)

  Remove the appender passed as parameter form the list of attached appenders.
  Specified by:
    `removeAppender` in interface `AppenderAttachable`

### removeAppender

    public void removeAppender(String name)

  Remove the appender with the name passed as parameter form the list of appenders.
  Specified by:
    `removeAppender` in interface `AppenderAttachable`

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

Copyright 2000-2005 Apache Software Foundation.