org.apache.log4j.chainsaw

## Class ChainsawAppenderHandler

- java.lang.Object
- - org.apache.log4j.AppenderSkeleton
  - - org.apache.log4j.chainsaw.ChainsawAppenderHandler

- All Implemented Interfaces:
    org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

      public class ChainsawAppenderHandler
      extends org.apache.log4j.AppenderSkeleton

  A handler class that either extends a particular appender hierarchy or can be bound into the Log4j appender framework, and queues events, to be later dispatched to registered/interested parties.
  Author:
    Scott Deboy <sdeboy@apache.org>, Paul Smith <psmith@apache.org>

- - ### Field Summary

    - ### Fields inherited from class org.apache.log4j.AppenderSkeleton

      `closed, errorHandler, headFilter, layout, name, tailFilter, threshold`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChainsawAppenderHandler()`
    `ChainsawAppenderHandler(ChainsawAppender appender)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCustomEventBatchListener(String identifier, EventBatchListener l)`
    `void` | `addEventBatchListener(EventBatchListener l)`
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)`
    `void` | `addPropertyChangeListener(String propertyName, PropertyChangeListener listener)`
    `void` | `append(org.apache.log4j.spi.LoggingEvent event)`
    `void` | `close()`
    `double` | `getDataRate()` Exposes the current Data rate calculated.
    `String` | `getIdentifierExpression()`
    `int` | `getQueueInterval()`
    `static void` | `main(String[] args)` A little test bed
    `void` | `removeEventBatchListener(EventBatchListener l)`
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)`
    `void` | `removePropertyChangeListener(String propertyName, PropertyChangeListener listener)`
    `boolean` | `requiresLayout()`
    `void` | `setIdentifierExpression(String identifierExpression)`
    `void` | `setQueueInterval(int interval)`

    - ### Methods inherited from class org.apache.log4j.AppenderSkeleton

      `activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ChainsawAppenderHandler

          public ChainsawAppenderHandler(ChainsawAppender appender)

    - #### ChainsawAppenderHandler

          public ChainsawAppenderHandler()

  - ### Method Detail

    - #### setIdentifierExpression

          public void setIdentifierExpression(String identifierExpression)

    - #### getIdentifierExpression

          public String getIdentifierExpression()

    - #### addCustomEventBatchListener

          public void addCustomEventBatchListener(String identifier,
                                                  EventBatchListener l)
                                           throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### addEventBatchListener

          public void addEventBatchListener(EventBatchListener l)

    - #### removeEventBatchListener

          public void removeEventBatchListener(EventBatchListener l)

    - #### append

          public void append(org.apache.log4j.spi.LoggingEvent event)

      Specified by:
        `append` in class `org.apache.log4j.AppenderSkeleton`

    - #### close

          public void close()

    - #### requiresLayout

          public boolean requiresLayout()

    - #### getQueueInterval

          public int getQueueInterval()

    - #### setQueueInterval

          public void setQueueInterval(int interval)

    - #### main

          public static void main(String[] args)
                           throws InterruptedException

      A little test bed
      Parameters:
        `args` -
      Throws:
        `InterruptedException`

    - #### getDataRate

          public double getDataRate()

      Exposes the current Data rate calculated. This is periodically updated by an internal Thread as is the number of events that have been processed, and dispatched to all listeners since the last sample period divided by the number of seconds since the last sample period. This method fires a PropertyChange event so listeners can monitor the rate
      Returns:
        double # of events processed per second

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Parameters:
        `listener` -

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(String propertyName,
                                                PropertyChangeListener listener)

      Parameters:
        `propertyName` -
        `listener` -

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Parameters:
        `listener` -

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(String propertyName,
                                                   PropertyChangeListener listener)

      Parameters:
        `propertyName` -
        `listener` -

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