@Test public void shouldNotCallListenersForOtherTenants() throws Exception { listener.registerListener("otherTenantId", extension); listener.onEvent(systemUpdatedEvent); verify(extension, never()).onUpdate(any(PK.class)); }
@Override protected void onEvent(HybrisAdapter.SystemUpdatedEvent event) { if (!hasListenersForTenant(event.getTenantId())) { return; } for (FireflyExtension fireflyExtension : getListenersForTenant(event.getTenantId())) { fireflyExtension.onUpdate(event.getMigration()); } }
SystemUpdateEventListener extends EventDistributor<HybrisAdapter.SystemUpdatedEvent, FireflyExtension> { @Override protected void onEvent(HybrisAdapter.SystemUpdatedEvent event) { if (!hasListenersForTenant(event.getTenantId())) { return; } for (FireflyExtension fireflyExtension : getListenersForTenant(event.getTenantId())) { fireflyExtension.onUpdate(event.getMigration()); } } }
SystemUpdateEventListener extends EventDistributor<HybrisAdapter.SystemUpdatedEvent, FireflyExtension> { @Override protected void onEvent(HybrisAdapter.SystemUpdatedEvent event) { if (!hasListenersForTenant(event.getTenantId())) { return; } for (FireflyExtension fireflyExtension : getListenersForTenant(event.getTenantId())) { fireflyExtension.onUpdate(event.getMigration()); } } @Autowired  SystemUpdateEventListener(ClusterService clusterService,
                                     TenantService tenantService); }
SystemUpdateEventListener extends EventDistributor<HybrisAdapter.SystemUpdatedEvent, FireflyExtension> { @Override protected void onEvent(HybrisAdapter.SystemUpdatedEvent event) { if (!hasListenersForTenant(event.getTenantId())) { return; } for (FireflyExtension fireflyExtension : getListenersForTenant(event.getTenantId())) { fireflyExtension.onUpdate(event.getMigration()); } } @Autowired  SystemUpdateEventListener(ClusterService clusterService,
                                     TenantService tenantService);  }
SystemUpdateEventListener extends EventDistributor<HybrisAdapter.SystemUpdatedEvent, FireflyExtension> { @Override protected void onEvent(HybrisAdapter.SystemUpdatedEvent event) { if (!hasListenersForTenant(event.getTenantId())) { return; } for (FireflyExtension fireflyExtension : getListenersForTenant(event.getTenantId())) { fireflyExtension.onUpdate(event.getMigration()); } } @Autowired  SystemUpdateEventListener(ClusterService clusterService,
                                     TenantService tenantService);   }