Package ch.qos.logback.core.spi
Class FilterAttachableImpl<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.FilterAttachableImpl<E>
-
- All Implemented Interfaces:
FilterAttachable<E>
public final class FilterAttachableImpl<E> extends java.lang.Object implements FilterAttachable<E>
Implementation of FilterAttachable.
-
-
Constructor Summary
Constructors Constructor Description FilterAttachableImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(Filter<E> newFilter)Add a filter to end of the filter list.voidclearAllFilters()Clear the filter chainjava.util.List<Filter<E>>getCopyOfAttachedFiltersList()Get a copy of all the filters contained within this FilterAttachable object.FilterReplygetFilterChainDecision(E event)Loop through the filters in the list.
-
-
-
Method Detail
-
addFilter
public void addFilter(Filter<E> newFilter)
Add a filter to end of the filter list.- Specified by:
addFilterin interfaceFilterAttachable<E>
-
clearAllFilters
public void clearAllFilters()
Clear the filter chain- Specified by:
clearAllFiltersin interfaceFilterAttachable<E>
-
getFilterChainDecision
public FilterReply getFilterChainDecision(E event)
Loop through the filters in the list. As soon as a filter decides on ACCEPT or DENY, then that value is returned. If all of the filters return NEUTRAL, then NEUTRAL is returned.- Specified by:
getFilterChainDecisionin interfaceFilterAttachable<E>
-
getCopyOfAttachedFiltersList
public java.util.List<Filter<E>> getCopyOfAttachedFiltersList()
Description copied from interface:FilterAttachableGet a copy of all the filters contained within this FilterAttachable object.- Specified by:
getCopyOfAttachedFiltersListin interfaceFilterAttachable<E>- Returns:
- all attached filters as a list
-
-