@Test public void testOnStoreChanged_LocalEvent() { when(configEvent.isLocal()).thenReturn(true); underTest.onStoreChanged(configEvent); verifyZeroInteractions(eventManager, configStore); }
@Subscribe public void onStoreChanged(final HttpClientConfigurationEvent event) { if (!event.isLocal()) { log.debug("Reloading configuration after change by node {}", event.getRemoteNodeId()); HttpClientConfiguration model; synchronized (lock) { configuration = model = loadConfiguration(); } eventManager.post(new HttpClientConfigurationChangedEvent(model)); } }
HttpClientManagerImpl extends StateGuardLifecycleSupport implements HttpClientManager, EventAware { @Subscribe public void onStoreChanged(final HttpClientConfigurationEvent event) { if (!event.isLocal()) { log.debug("Reloading configuration after change by node {}", event.getRemoteNodeId()); HttpClientConfiguration model; synchronized (lock) { configuration = model = loadConfiguration(); } eventManager.post(new HttpClientConfigurationChangedEvent(model)); } } }
HttpClientManagerImpl extends StateGuardLifecycleSupport implements HttpClientManager, EventAware { @Subscribe public void onStoreChanged(final HttpClientConfigurationEvent event) { if (!event.isLocal()) { log.debug("Reloading configuration after change by node {}", event.getRemoteNodeId()); HttpClientConfiguration model; synchronized (lock) { configuration = model = loadConfiguration(); } eventManager.post(new HttpClientConfigurationChangedEvent(model)); } } @Inject  HttpClientManagerImpl(final EventManager eventManager,
      final HttpClientConfigurationStore store,
      @Named("initial") final Provider<HttpClientConfiguration> defaults,
      final SharedHttpClientConnectionManager sharedConnectionManager,
      final DefaultsCustomizer defaultsCustomizer); }
HttpClientManagerImpl extends StateGuardLifecycleSupport implements HttpClientManager, EventAware { @Subscribe public void onStoreChanged(final HttpClientConfigurationEvent event) { if (!event.isLocal()) { log.debug("Reloading configuration after change by node {}", event.getRemoteNodeId()); HttpClientConfiguration model; synchronized (lock) { configuration = model = loadConfiguration(); } eventManager.post(new HttpClientConfigurationChangedEvent(model)); } } @Inject  HttpClientManagerImpl(final EventManager eventManager,
      final HttpClientConfigurationStore store,
      @Named("initial") final Provider<HttpClientConfiguration> defaults,
      final SharedHttpClientConnectionManager sharedConnectionManager,
      final DefaultsCustomizer defaultsCustomizer); @Override @Guarded(by = STARTED) HttpClientConfiguration getConfiguration(); @Override @Guarded(by = STARTED) void setConfiguration(final HttpClientConfiguration configuration); @Subscribe void onStoreChanged(final HttpClientConfigurationEvent event); @Override @Guarded(by = STARTED) CloseableHttpClient create(@Nullable final HttpClientPlan.Customizer customizer); @Override @Guarded(by = STARTED) CloseableHttpClient create(); @Override @Guarded(by = STARTED) HttpClientBuilder prepare(@Nullable final Customizer customizer); @Override HttpClientConfiguration newConfiguration(); }
HttpClientManagerImpl extends StateGuardLifecycleSupport implements HttpClientManager, EventAware { @Subscribe public void onStoreChanged(final HttpClientConfigurationEvent event) { if (!event.isLocal()) { log.debug("Reloading configuration after change by node {}", event.getRemoteNodeId()); HttpClientConfiguration model; synchronized (lock) { configuration = model = loadConfiguration(); } eventManager.post(new HttpClientConfigurationChangedEvent(model)); } } @Inject  HttpClientManagerImpl(final EventManager eventManager,
      final HttpClientConfigurationStore store,
      @Named("initial") final Provider<HttpClientConfiguration> defaults,
      final SharedHttpClientConnectionManager sharedConnectionManager,
      final DefaultsCustomizer defaultsCustomizer); @Override @Guarded(by = STARTED) HttpClientConfiguration getConfiguration(); @Override @Guarded(by = STARTED) void setConfiguration(final HttpClientConfiguration configuration); @Subscribe void onStoreChanged(final HttpClientConfigurationEvent event); @Override @Guarded(by = STARTED) CloseableHttpClient create(@Nullable final HttpClientPlan.Customizer customizer); @Override @Guarded(by = STARTED) CloseableHttpClient create(); @Override @Guarded(by = STARTED) HttpClientBuilder prepare(@Nullable final Customizer customizer); @Override HttpClientConfiguration newConfiguration();  }