@SuppressWarnings("rawtypes") public void removeListeners(Class listenerClass) { delegate.removeListeners(listenerClass); }
public void removeListeners(Class listenerClass) { delegate.removeListeners(listenerClass); }
public void removeListeners(Class listenerClass) { delegate.removeListeners(listenerClass); }
public void removeListeners(Class listenerClass) { delegate.removeListeners(listenerClass); }
public void setCatalog(Catalog catalog) { this.catalog = catalog; this.repository = new CatalogRepository(catalog); catalog.removeListeners(CacheClearingListener.class); catalog.addListener(new CacheClearingListener()); }
protected void readCatalog(Catalog catalog, XStreamPersister xp) throws Exception { // we are going to synch up the catalogs and need to preserve listeners, // but these two fellas are attached to the new catalog as well catalog.removeListeners(ResourcePool.CacheClearingListener.class); catalog.removeListeners(GeoServerConfigPersister.class); catalog.removeListeners(GeoServerResourcePersister.class); List<CatalogListener> listeners = new ArrayList<CatalogListener>(catalog.getListeners()); // look for catalog.xml, if it exists assume we are dealing with // an old data directory Resource f = resourceLoader.get("catalog.xml"); if (!Resources.exists(f)) { // assume 2.x style data directory CatalogImpl catalog2 = (CatalogImpl) readCatalog(xp); // make to remove the old resource pool catalog listener ((CatalogImpl) catalog).sync(catalog2); } else { // import old style catalog, register the persister now so that we start // with a new version of the catalog CatalogImpl catalog2 = (CatalogImpl) readLegacyCatalog(f, xp); ((CatalogImpl) catalog).sync(catalog2); } // attach back the old listeners for (CatalogListener listener : listeners) { catalog.addListener(listener); } }
expect(catalog.getResourceLoader()).andReturn(loader).anyTimes(); catalog.removeListeners((Class) EasyMock.anyObject()); expectLastCall().anyTimes();