public abstract class AbstractFilterable extends AbstractLifeCycle implements Filterable
LifeCycle.State
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
Modifier | Constructor and Description |
---|---|
protected |
AbstractFilterable() |
protected |
AbstractFilterable(Filter filter) |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(Filter filter)
Adds 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)
Removes a Filter.
|
void |
start()
Make the Filter available for use.
|
void |
stop()
Cleanup the Filter.
|
equalsImpl, getState, hashCodeImpl, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping
protected AbstractFilterable(Filter filter)
protected AbstractFilterable()
public Filter getFilter()
getFilter
in interface Filterable
public void addFilter(Filter filter)
addFilter
in interface Filterable
filter
- The Filter to add.public void removeFilter(Filter filter)
removeFilter
in interface Filterable
filter
- The Filter to remove.public boolean hasFilter()
hasFilter
in interface Filterable
public void start()
start
in interface LifeCycle
start
in class AbstractLifeCycle
public void stop()
stop
in interface LifeCycle
stop
in class AbstractLifeCycle
public boolean isFiltered(LogEvent event)
isFiltered
in interface Filterable
event
- The LogEvent.Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.