ch.qos.logback.core.spi
Class FilterAttachableImpl<E>

java.lang.Object
  extended by 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.

Author:
Ceki Gülcü

Constructor Summary
FilterAttachableImpl()
           
 
Method Summary
 void addFilter(Filter<E> newFilter)
          Add a filter to end of the filter list.
 void clearAllFilters()
          Clear the filter chain
 java.util.List<Filter<E>> getCopyOfAttachedFiltersList()
          Get a copy of all the filters contained within this FilterAttachable object.
 FilterReply getFilterChainDecision(E event)
          Loop through the filters in the list.
 Filter<E> getFirstFilter()
          Get first filter in the chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterAttachableImpl

public FilterAttachableImpl()
Method Detail

addFilter

public void addFilter(Filter<E> newFilter)
Add a filter to end of the filter list.

Specified by:
addFilter in interface FilterAttachable<E>

getFirstFilter

public Filter<E> getFirstFilter()
Get first filter in the chain.

Specified by:
getFirstFilter in interface FilterAttachable<E>

clearAllFilters

public void clearAllFilters()
Clear the filter chain

Specified by:
clearAllFilters in interface FilterAttachable<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:
getFilterChainDecision in interface FilterAttachable<E>

getCopyOfAttachedFiltersList

public java.util.List<Filter<E>> getCopyOfAttachedFiltersList()
Description copied from interface: FilterAttachable
Get a copy of all the filters contained within this FilterAttachable object.

Specified by:
getCopyOfAttachedFiltersList in interface FilterAttachable<E>
Returns:
all attached filters as a list


Copyright © 2005-2010 QOS.ch. All Rights Reserved.