001package org.javasimon.callback;
002
003/**
004 * FilterCallback extends {@link Callback} adding filtering capabilities. {@link FilterRule}s can be added to
005 * the filter callback, these allow selective event propagation to sub-callback(s).
006 *
007 * @author <a href="mailto:virgo47@gmail.com">Richard "Virgo" Richter</a>
008 */
009public interface FilterCallback extends Callback {
010        /**
011         * Adds the rule to the filter.
012         *
013         * @param type rule type (must, suffice, must-not)
014         * @param condition further conditions of the rule
015         * @param pattern Simon pattern
016         * @param events event list (empty applies to all, can be omitted)
017         */
018        void addRule(FilterRule.Type type, String condition, String pattern, Event... events);
019}