1 package emissary.core.sentinel.protocols.rules; 2 3 import org.slf4j.Logger; 4 import org.slf4j.LoggerFactory; 5 6 import java.lang.invoke.MethodHandles; 7 import java.util.Collection; 8 9 public abstract class Rule<T> { 10 11 protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); 12 13 public Rule() { 14 15 } 16 17 /** 18 * Check the rule conditions 19 * 20 * @param items collection of items to check 21 * @return true if conditions are met, false otherwise 22 */ 23 public abstract boolean condition(Collection<T> items); 24 25 }