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

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

public abstract class AbstractFilterable
extends Object
implements Filterable

Enhances a Class by allowing it to contain Filters.


Constructor Summary
protected AbstractFilterable()
           
protected AbstractFilterable(Filter filter)
           
 
Method Summary
 void addFilter(Filter filter)
          Add a filter.
 Filter getFilter()
          Returns 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

AbstractFilterable

protected AbstractFilterable(Filter filter)

AbstractFilterable

protected AbstractFilterable()
Method Detail

getFilter

public Filter getFilter()
Returns the Filter.

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

addFilter

public void addFilter(Filter filter)
Add a filter.

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

removeFilter

public void removeFilter(Filter filter)
Remove a Filter.

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

hasFilter

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

Specified by:
hasFilter in interface Filterable
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 Filterable
Parameters:
event - The LogEvent.
Returns:
true if the LogEvent should be processed.


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