@Test public void relaysAddListenerToRegistryDelegate() { FileBackedRegistry<BackendService> delegate = mock(FileBackedRegistry.class); Registry.ChangeListener<BackendService> listener = mock(Registry.ChangeListener.class); registry = new FileBackedBackendServicesRegistry(delegate, FileMonitor.DISABLED); registry.addListener(listener); verify(delegate).addListener(eq(listener)); }
@Override public Registry<BackendService> addListener(ChangeListener<BackendService> changeListener) { return this.fileBackedRegistry.addListener(changeListener); }
FileBackedBackendServicesRegistry extends AbstractStyxService implements Registry<BackendService>, FileChangeMonitor.Listener { @Override public Registry<BackendService> addListener(ChangeListener<BackendService> changeListener) { return this.fileBackedRegistry.addListener(changeListener); } }
FileBackedBackendServicesRegistry extends AbstractStyxService implements Registry<BackendService>, FileChangeMonitor.Listener { @Override public Registry<BackendService> addListener(ChangeListener<BackendService> changeListener) { return this.fileBackedRegistry.addListener(changeListener); } @VisibleForTesting  FileBackedBackendServicesRegistry(FileBackedRegistry<BackendService> fileBackedRegistry, FileMonitor fileChangeMonitor); @VisibleForTesting  FileBackedBackendServicesRegistry(Resource originsFile, FileMonitor fileChangeMonitor); }
FileBackedBackendServicesRegistry extends AbstractStyxService implements Registry<BackendService>, FileChangeMonitor.Listener { @Override public Registry<BackendService> addListener(ChangeListener<BackendService> changeListener) { return this.fileBackedRegistry.addListener(changeListener); } @VisibleForTesting  FileBackedBackendServicesRegistry(FileBackedRegistry<BackendService> fileBackedRegistry, FileMonitor fileChangeMonitor); @VisibleForTesting  FileBackedBackendServicesRegistry(Resource originsFile, FileMonitor fileChangeMonitor); static FileBackedBackendServicesRegistry create(String originsFile); @Override Registry<BackendService> addListener(ChangeListener<BackendService> changeListener); @Override Registry<BackendService> removeListener(ChangeListener<BackendService> changeListener); @Override CompletableFuture<ReloadResult> reload(); @Override Iterable<BackendService> get(); @Override CompletableFuture<Void> stop(); @Override void fileChanged(); @Override String toString(); }
FileBackedBackendServicesRegistry extends AbstractStyxService implements Registry<BackendService>, FileChangeMonitor.Listener { @Override public Registry<BackendService> addListener(ChangeListener<BackendService> changeListener) { return this.fileBackedRegistry.addListener(changeListener); } @VisibleForTesting  FileBackedBackendServicesRegistry(FileBackedRegistry<BackendService> fileBackedRegistry, FileMonitor fileChangeMonitor); @VisibleForTesting  FileBackedBackendServicesRegistry(Resource originsFile, FileMonitor fileChangeMonitor); static FileBackedBackendServicesRegistry create(String originsFile); @Override Registry<BackendService> addListener(ChangeListener<BackendService> changeListener); @Override Registry<BackendService> removeListener(ChangeListener<BackendService> changeListener); @Override CompletableFuture<ReloadResult> reload(); @Override Iterable<BackendService> get(); @Override CompletableFuture<Void> stop(); @Override void fileChanged(); @Override String toString();  }