@Test public void testGetCaches() throws IOException, ParserConfigurationException, SAXException { HttpURLConnection result = HttpUtil.get("http: assertEquals(200, result.getResponseCode()); }
@GET public Caches getCaches() { LOG.info("GET Caches"); String[] cacheNames = CacheManager.getInstance().getCacheNames(); List<Cache> cacheList = new ArrayList<Cache>(); for (String cacheName : cacheNames) { URI cacheUri = uriInfo.getAbsolutePathBuilder().path(cacheName).build().normalize(); Cache cache = new Cache(cacheName, cacheUri.toString()); cacheList.add(cache); } return new Caches(cacheList); }
CachesResource { @GET public Caches getCaches() { LOG.info("GET Caches"); String[] cacheNames = CacheManager.getInstance().getCacheNames(); List<Cache> cacheList = new ArrayList<Cache>(); for (String cacheName : cacheNames) { URI cacheUri = uriInfo.getAbsolutePathBuilder().path(cacheName).build().normalize(); Cache cache = new Cache(cacheName, cacheUri.toString()); cacheList.add(cache); } return new Caches(cacheList); } }
CachesResource { @GET public Caches getCaches() { LOG.info("GET Caches"); String[] cacheNames = CacheManager.getInstance().getCacheNames(); List<Cache> cacheList = new ArrayList<Cache>(); for (String cacheName : cacheNames) { URI cacheUri = uriInfo.getAbsolutePathBuilder().path(cacheName).build().normalize(); Cache cache = new Cache(cacheName, cacheUri.toString()); cacheList.add(cache); } return new Caches(cacheList); }  }
CachesResource { @GET public Caches getCaches() { LOG.info("GET Caches"); String[] cacheNames = CacheManager.getInstance().getCacheNames(); List<Cache> cacheList = new ArrayList<Cache>(); for (String cacheName : cacheNames) { URI cacheUri = uriInfo.getAbsolutePathBuilder().path(cacheName).build().normalize(); Cache cache = new Cache(cacheName, cacheUri.toString()); cacheList.add(cache); } return new Caches(cacheList); }  @Path("{cache}") CacheResource getCacheResource(@PathParam("cache") String cache); @GET Caches getCaches(); }
CachesResource { @GET public Caches getCaches() { LOG.info("GET Caches"); String[] cacheNames = CacheManager.getInstance().getCacheNames(); List<Cache> cacheList = new ArrayList<Cache>(); for (String cacheName : cacheNames) { URI cacheUri = uriInfo.getAbsolutePathBuilder().path(cacheName).build().normalize(); Cache cache = new Cache(cacheName, cacheUri.toString()); cacheList.add(cache); } return new Caches(cacheList); }  @Path("{cache}") CacheResource getCacheResource(@PathParam("cache") String cache); @GET Caches getCaches();  }