@Test public void testRouterUrlsWithAndWithoutSlashAtTheEnd() { System.setProperty(KieServerConstants.KIE_SERVER_ROUTER, "http: KieServerRouterEventListener client = new KieServerRouterEventListener(); List<String> routerUrls = client.routers(); assertNotNull(routerUrls); assertEquals(3, routerUrls.size()); assertTrue(routerUrls.contains("http: assertTrue(routerUrls.contains("http: assertTrue(routerUrls.contains("http: }
protected List<String> routers() { ArrayList<String> list = new ArrayList<>(); String[] routerUrls = routerURL.split(","); for (String routerUrl : routerUrls) { routerUrl = routerUrl.trim(); if (routerUrl.endsWith("/")) { routerUrl = routerUrl.substring(0, routerUrl.length()-1); } list.add(routerUrl); } return list; }
KieServerRouterEventListener implements KieServerEventListener { protected List<String> routers() { ArrayList<String> list = new ArrayList<>(); String[] routerUrls = routerURL.split(","); for (String routerUrl : routerUrls) { routerUrl = routerUrl.trim(); if (routerUrl.endsWith("/")) { routerUrl = routerUrl.substring(0, routerUrl.length()-1); } list.add(routerUrl); } return list; } }
KieServerRouterEventListener implements KieServerEventListener { protected List<String> routers() { ArrayList<String> list = new ArrayList<>(); String[] routerUrls = routerURL.split(","); for (String routerUrl : routerUrls) { routerUrl = routerUrl.trim(); if (routerUrl.endsWith("/")) { routerUrl = routerUrl.substring(0, routerUrl.length()-1); } list.add(routerUrl); } return list; } KieServerRouterEventListener();  KieServerRouterEventListener(String serverId, String serverURL, String routerURL, int failedAttemptsInterval); }
KieServerRouterEventListener implements KieServerEventListener { protected List<String> routers() { ArrayList<String> list = new ArrayList<>(); String[] routerUrls = routerURL.split(","); for (String routerUrl : routerUrls) { routerUrl = routerUrl.trim(); if (routerUrl.endsWith("/")) { routerUrl = routerUrl.substring(0, routerUrl.length()-1); } list.add(routerUrl); } return list; } KieServerRouterEventListener();  KieServerRouterEventListener(String serverId, String serverURL, String routerURL, int failedAttemptsInterval); @Override void beforeServerStarted(KieServer kieServer); @Override void afterServerStarted(KieServer kieServer); @Override void beforeServerStopped(KieServer kieServer); @Override void afterServerStopped(KieServer kieServer); @Override void beforeContainerStarted(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerStarted(KieServer kieServer, KieContainerInstance containerInstance); @Override void beforeContainerStopped(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerStopped(KieServer kieServer, KieContainerInstance containerInstance); @Override void beforeContainerActivated(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerActivated(KieServer kieServer, KieContainerInstance containerInstance); @Override void beforeContainerDeactivated(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerDeactivated(KieServer kieServer, KieContainerInstance containerInstance); String getUsername(); RouterConnectionObserver getObserver(); void setObserver(RouterConnectionObserver observer); void close(); }
KieServerRouterEventListener implements KieServerEventListener { protected List<String> routers() { ArrayList<String> list = new ArrayList<>(); String[] routerUrls = routerURL.split(","); for (String routerUrl : routerUrls) { routerUrl = routerUrl.trim(); if (routerUrl.endsWith("/")) { routerUrl = routerUrl.substring(0, routerUrl.length()-1); } list.add(routerUrl); } return list; } KieServerRouterEventListener();  KieServerRouterEventListener(String serverId, String serverURL, String routerURL, int failedAttemptsInterval); @Override void beforeServerStarted(KieServer kieServer); @Override void afterServerStarted(KieServer kieServer); @Override void beforeServerStopped(KieServer kieServer); @Override void afterServerStopped(KieServer kieServer); @Override void beforeContainerStarted(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerStarted(KieServer kieServer, KieContainerInstance containerInstance); @Override void beforeContainerStopped(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerStopped(KieServer kieServer, KieContainerInstance containerInstance); @Override void beforeContainerActivated(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerActivated(KieServer kieServer, KieContainerInstance containerInstance); @Override void beforeContainerDeactivated(KieServer kieServer, KieContainerInstance containerInstance); @Override void afterContainerDeactivated(KieServer kieServer, KieContainerInstance containerInstance); String getUsername(); RouterConnectionObserver getObserver(); void setObserver(RouterConnectionObserver observer); void close();  }