public static MatchRule of(Collection<MatchRule> rules) { return new ComposedMatchRule(new LinkedHashSet<>(rules)); }
public Builder defaultMatchRules(MatchRule... defaultMatchRules) { this.defaultMatchRule = ComposedMatchRule.of(defaultMatchRules); return this; }
public Builder defaultMatchRules(MatchRule... defaultMatchRules) { this.defaultMatchRule = ComposedMatchRule.of(defaultMatchRules); return this; }
public static MatchRule of(Collection<MatchRule> rules) { return new ComposedMatchRule(new LinkedHashSet<>(rules)); }
public Builder withProperties(Properties properties) { if (properties.containsKey("okreplay.tapeRoot")) { tapeRoot(new File(properties.getProperty("okreplay.tapeRoot"))); } if (properties.containsKey("okreplay.defaultMode")) { defaultMode(TapeMode.valueOf(properties.getProperty("okreplay.defaultMode"))); } if (properties.containsKey("okreplay.defaultMatchRules")) { String property = properties.getProperty("okreplay.defaultMatchRules"); List<MatchRule> rules = new ArrayList<>(); for (String s : Arrays.asList(property.split(","))) { rules.add(MatchRules.valueOf(s)); } defaultMatchRule(ComposedMatchRule.of(rules)); } if (properties.containsKey("okreplay.ignoreHosts")) { ignoreHosts(Arrays.asList(properties.getProperty("okreplay.ignoreHosts").split(","))); } if (properties.containsKey("okreplay.ignoreLocalhost")) { ignoreLocalhost(Boolean.valueOf(properties.getProperty("okreplay.ignoreLocalhost"))); } if (properties.containsKey("okreplay.sslEnabled")) { sslEnabled(TypedProperties.getBoolean(properties, "okreplay.sslEnabled")); } return this; }
public static MatchRule of(MatchRule... rules) { return new ComposedMatchRule(new LinkedHashSet<>(Arrays.asList(rules))); }
public Builder withProperties(Properties properties) { if (properties.containsKey("okreplay.tapeRoot")) { tapeRoot(new File(properties.getProperty("okreplay.tapeRoot"))); } if (properties.containsKey("okreplay.defaultMode")) { defaultMode(TapeMode.valueOf(properties.getProperty("okreplay.defaultMode"))); } if (properties.containsKey("okreplay.defaultMatchRules")) { String property = properties.getProperty("okreplay.defaultMatchRules"); List<MatchRule> rules = new ArrayList<>(); for (String s : Arrays.asList(property.split(","))) { rules.add(MatchRules.valueOf(s)); } defaultMatchRule(ComposedMatchRule.of(rules)); } if (properties.containsKey("okreplay.ignoreHosts")) { ignoreHosts(Arrays.asList(properties.getProperty("okreplay.ignoreHosts").split(","))); } if (properties.containsKey("okreplay.ignoreLocalhost")) { ignoreLocalhost(Boolean.valueOf(properties.getProperty("okreplay.ignoreLocalhost"))); } if (properties.containsKey("okreplay.sslEnabled")) { sslEnabled(TypedProperties.getBoolean(properties, "okreplay.sslEnabled")); } return this; }
public static MatchRule of(MatchRule... rules) { return new ComposedMatchRule(new LinkedHashSet<>(Arrays.asList(rules))); }