org.apache.log4j.component.spi

## Interface Thresholdable

- All Known Implementing Classes:
    CustomSQLDBReceiver, DBReceiver, JMSReceiver, LogFilePatternReceiver, LogFileXMLReceiver, MulticastReceiver, Receiver, SocketHubReceiver, SocketReceiver, UDPReceiver, XMLSocketReceiver

      public interface Thresholdable

  An interface that defines the required methods for supporting the setting and getting of a level threshold. Components should implement this interface if logging events they process should meet a certain threshold before being processed further. Examples of this are Appenders and Receivers which will not process logging events unless the event level is at or greater than a set threshold level.
  Author:
    Paul Smith (psmith@apache.org), Mark Womack

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.log4j.Level` | `getThreshold()` Gets the current threshold setting of the component.
    `boolean` | `isAsSevereAsThreshold(org.apache.log4j.Level level)` Returns true if the given level is equals or greater than the current threshold value of the component.
    `void` | `setThreshold(org.apache.log4j.Level level)` Sets the component theshold to the given level.

- - ### Method Detail

    - #### setThreshold

          void setThreshold(org.apache.log4j.Level level)

      Sets the component theshold to the given level.
      Parameters:
        `level` - The threshold level events must equal or be greater than before further processing can be done.

    - #### getThreshold

          org.apache.log4j.Level getThreshold()

      Gets the current threshold setting of the component.
      Returns:
        Level The current threshold level of the component.

    - #### isAsSevereAsThreshold

          boolean isAsSevereAsThreshold(org.apache.log4j.Level level)

      Returns true if the given level is equals or greater than the current threshold value of the component.
      Parameters:
        `level` - The level to test against the component threshold.
      Returns:
        boolean True if level is equal or greater than the component threshold.

Copyright © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.