org.apache.logging.log4j.core.filter
Class Filterable

java.lang.Object
  extended by org.apache.logging.log4j.core.filter.Filterable
All Implemented Interfaces:
Filtering
Direct Known Subclasses:
AppenderBase, AppenderControl, BaseConfiguration, LoggerConfig

public class Filterable
extends Object
implements Filtering

Enhances a Class by allowing it to contain Filters.


Constructor Summary
protected Filterable()
           
protected Filterable(Filter filter)
           
 
Method Summary
 void addFilter(Filter filter)
          Add a filter.
 Filter getFilter()
          Return the Filter.
 boolean hasFilter()
          Determines if a Filter is present.
 boolean isFiltered(LogEvent event)
          Determine if the LogEvent should be processed or ignored.
 void removeFilter(Filter filter)
          Remove a Filter.
 void startFilter()
          Make the Filter available for use.
 void stopFilter()
          Cleanup the Filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filterable

protected Filterable(Filter filter)

Filterable

protected Filterable()
Method Detail

getFilter

public Filter getFilter()
Return the Filter.

Specified by:
getFilter in interface Filtering
Returns:
the Filter.

addFilter

public void addFilter(Filter filter)
Add a filter.

Specified by:
addFilter in interface Filtering
Parameters:
filter - The Filter to add.

removeFilter

public void removeFilter(Filter filter)
Remove a Filter.

Specified by:
removeFilter in interface Filtering
Parameters:
filter - The Filter to remove.

hasFilter

public boolean hasFilter()
Determines if a Filter is present.

Specified by:
hasFilter in interface Filtering
Returns:
false if no Filter is present.

startFilter

public void startFilter()
Make the Filter available for use.


stopFilter

public void stopFilter()
Cleanup the Filter.


isFiltered

public boolean isFiltered(LogEvent event)
Determine if the LogEvent should be processed or ignored.

Specified by:
isFiltered in interface Filtering
Parameters:
event - The LogEvent.
Returns:
true if the LogEvent should be processed.


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.