@Test public void testBuild_NoMatch_URI() throws Exception { JettyRouteSpec spec = LifecycleHelper.initAndStart(new JettyRouteSpec(REGEX_WITH_GROUP, "", Arrays.asList(RECORD_ID), NEXT_SERVICE_ID)); JettyRoute match = spec.build("GET", "/does/not/match"); assertFalse(match.matches()); }
private JettyRouteCondition build() { if (getCondition() == null) { LoggingHelper.logWarning(warningLogged, () -> { warningLogged = true; }, "Direct use of urlPattern/metadataKeys/method is deprecated; use a condition instead"); return new JettyRouteCondition().withMetadataKeys(metadataKeys()).withMethod(getMethod()).withUrlPattern(urlPattern()); } return getCondition(); }
JettyRouteSpec implements ComponentLifecycle { private JettyRouteCondition build() { if (getCondition() == null) { LoggingHelper.logWarning(warningLogged, () -> { warningLogged = true; }, "Direct use of urlPattern/metadataKeys/method is deprecated; use a condition instead"); return new JettyRouteCondition().withMetadataKeys(metadataKeys()).withMethod(getMethod()).withUrlPattern(urlPattern()); } return getCondition(); } }
JettyRouteSpec implements ComponentLifecycle { private JettyRouteCondition build() { if (getCondition() == null) { LoggingHelper.logWarning(warningLogged, () -> { warningLogged = true; }, "Direct use of urlPattern/metadataKeys/method is deprecated; use a condition instead"); return new JettyRouteCondition().withMetadataKeys(metadataKeys()).withMethod(getMethod()).withUrlPattern(urlPattern()); } return getCondition(); } JettyRouteSpec(); @Deprecated  JettyRouteSpec(String urlPattern, String method, List<String> keys, String serviceId); }
JettyRouteSpec implements ComponentLifecycle { private JettyRouteCondition build() { if (getCondition() == null) { LoggingHelper.logWarning(warningLogged, () -> { warningLogged = true; }, "Direct use of urlPattern/metadataKeys/method is deprecated; use a condition instead"); return new JettyRouteCondition().withMetadataKeys(metadataKeys()).withMethod(getMethod()).withUrlPattern(urlPattern()); } return getCondition(); } JettyRouteSpec(); @Deprecated  JettyRouteSpec(String urlPattern, String method, List<String> keys, String serviceId); @Override void init(); @Override void start(); @Override void stop(); @Override void close(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") String getUrlPattern(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") void setUrlPattern(String urlPattern); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") String getMethod(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") void setMethod(String method); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") List<String> getMetadataKeys(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") void setMetadataKeys(List<String> s); String getServiceId(); void setServiceId(String serviceId); JettyRouteSpec withServiceId(String s); JettyRouteCondition getCondition(); void setCondition(JettyRouteCondition condition); JettyRouteSpec withCondition(JettyRouteCondition condition); JettyRoute build(String method, String uri); @Override String toString(); }
JettyRouteSpec implements ComponentLifecycle { private JettyRouteCondition build() { if (getCondition() == null) { LoggingHelper.logWarning(warningLogged, () -> { warningLogged = true; }, "Direct use of urlPattern/metadataKeys/method is deprecated; use a condition instead"); return new JettyRouteCondition().withMetadataKeys(metadataKeys()).withMethod(getMethod()).withUrlPattern(urlPattern()); } return getCondition(); } JettyRouteSpec(); @Deprecated  JettyRouteSpec(String urlPattern, String method, List<String> keys, String serviceId); @Override void init(); @Override void start(); @Override void stop(); @Override void close(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") String getUrlPattern(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") void setUrlPattern(String urlPattern); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") String getMethod(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") void setMethod(String method); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") List<String> getMetadataKeys(); @Deprecated @Removal(version = "3.12.0", message = "Use a condition instead") void setMetadataKeys(List<String> s); String getServiceId(); void setServiceId(String serviceId); JettyRouteSpec withServiceId(String s); JettyRouteCondition getCondition(); void setCondition(JettyRouteCondition condition); JettyRouteSpec withCondition(JettyRouteCondition condition); JettyRoute build(String method, String uri); @Override String toString();  }