@Test public void receivesBackendUpdates() { MemoryBackedRegistry<BackendService> registry = new MemoryBackedRegistry<>(); DashboardDataSupplier supplier = new DashboardDataSupplier(registry, environment, styxConfig); registry.add(backend("foo", origin("foo1"))); assertThat(supplier.get().downstream().firstBackend().id(), is("STYXPRES-foo")); registry.add(backend("bar", origin("bar1"))); assertThat(supplier.get().downstream().backendIds(), containsInAnyOrder("STYXPRES-foo", "STYXPRES-bar")); }
@Override public DashboardData get() { return data; }
DashboardDataSupplier implements Supplier<DashboardData>, Registry.ChangeListener<BackendService> { @Override public DashboardData get() { return data; } }
DashboardDataSupplier implements Supplier<DashboardData>, Registry.ChangeListener<BackendService> { @Override public DashboardData get() { return data; } DashboardDataSupplier(Registry<BackendService> backendServicesRegistry, Environment environment, StyxConfig styxConfig); }
DashboardDataSupplier implements Supplier<DashboardData>, Registry.ChangeListener<BackendService> { @Override public DashboardData get() { return data; } DashboardDataSupplier(Registry<BackendService> backendServicesRegistry, Environment environment, StyxConfig styxConfig); @Override void onChange(Registry.Changes<BackendService> changes); @Override DashboardData get(); }
DashboardDataSupplier implements Supplier<DashboardData>, Registry.ChangeListener<BackendService> { @Override public DashboardData get() { return data; } DashboardDataSupplier(Registry<BackendService> backendServicesRegistry, Environment environment, StyxConfig styxConfig); @Override void onChange(Registry.Changes<BackendService> changes); @Override DashboardData get();  }