public FilterReply getTurboFilterChainDecision ( final Marker marker , final Logger logger , final Level level , final String format , final Object [ ] params , final Throwable t ) { final int size = size ( ) ; // if (size == 0) { // return FilterReply.NEUTRAL; // } if ( size == 1 ) { try { TurboFilter tf = get ( 0 ) ; return tf . decide ( marker , logger , level , format , params , t ) ; } catch ( IndexOutOfBoundsException iobe ) { return FilterReply . NEUTRAL ; } } Object [ ] tfa = toArray ( ) ; final int len = tfa . length ; for ( int i = 0 ; i < len ; i ++ ) { //for (TurboFilter tf : this) { final TurboFilter tf = ( TurboFilter ) tfa [ i ] ; final FilterReply r = tf . decide ( marker , logger , level , format , params , t ) ; if ( r == FilterReply . DENY || r == FilterReply . ACCEPT ) { return r ; } } return FilterReply . NEUTRAL ; }
Loop through the filters in the chain . 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 .