private void registerForBus() { try { busService.getBus().register(listener); } catch (final EventBusException e) { log.error("Failed to register OverdueListener", e); } }
@LifecycleHandlerType(LifecycleLevel.STOP_SERVICE) public void stop() { try { busService.getBus().unregister(listener); } catch (final EventBusException e) { log.error("Failed to unregister OverdueListener", e); } checkNotifier.stop(); asyncNotifier.stop(); }
private void registerForBus() { try { busService.getBus().register(listener); } catch (final EventBusException e) { log.error("Failed to register OverdueListener", e); } }
@LifecycleHandlerType(LifecycleLevel.STOP_SERVICE) public void stop() { try { busService.getBus().unregister(listener); } catch (final EventBusException e) { log.error("Failed to unregister OverdueListener", e); } checkNotifier.stop(); asyncNotifier.stop(); }
protected void registerHandlers() throws EventBusException { busService.getBus().register(busHandler); }
public Invoice generateInvoice(final UUID accountId, @Nullable final LocalDate targetDate, @Nullable final DryRunArguments dryRunArguments, final InternalCallContext internalCallContext) throws InvoiceApiException { final InvoiceDispatcher dispatcher = new InvoiceDispatcher(generator, accountApi, billingApi, subscriptionApi, invoiceDao, internalCallContextFactory, invoicePluginDispatcher, locker, busService.getBus(), notificationQueueService, invoiceConfig, clock, parkedAccountsManager); return dispatcher.processAccountFromNotificationOrBusEvent(accountId, targetDate, dryRunArguments, false, internalCallContext); }
@AfterMethod(groups = "slow") public void afterMethod() throws Exception { if (hasFailed()) { return; } lifecycle.fireShutdownSequencePriorEventUnRegistration(); busService.getBus().unregister(busHandler); lifecycle.fireShutdownSequencePostEventUnRegistration(); log.debug("afterMethod callcontext classLoader = " + (Thread.currentThread().getContextClassLoader() != null ? Thread.currentThread().getContextClassLoader().toString() : "null")); log.debug("DONE WITH TEST"); }
internalCallContextFactory, invoicePluginDispatcher, locker, busService.getBus(), notificationQueueService, invoiceConfig, clock, parkedAccountsManager);
internalCallContextFactory, invoicePluginDispatcher, locker, busService.getBus(), notificationQueueService, invoiceConfig, clock, parkedAccountsManager); final Invoice invoice = dispatcher.processAccountFromNotificationOrBusEvent(account.getId(), new LocalDate("2012-07-30"), null, false, context);
@BeforeMethod(groups = "slow") public void beforeMethod() throws Exception { if (hasFailed()) { return; } log.debug("RESET TEST FRAMEWORK"); cleanupAllTables(); clock.resetDeltaFromReality(); busHandler.reset(); lifecycle.fireStartupSequencePriorEventRegistration(); busService.getBus().register(busHandler); externalBus.register(new FakeKPMPlugin()); lifecycle.fireStartupSequencePostEventRegistration(); }
@Override @BeforeMethod(groups = "slow") public void beforeMethod() throws Exception { if (hasFailed()) { return; } super.beforeMethod(); account = invoiceUtil.createAccount(callContext); subscription = invoiceUtil.createSubscription(); context = internalCallContextFactory.createInternalCallContext(account.getId(), callContext); dispatcher = new InvoiceDispatcher(generator, accountApi, billingApi, subscriptionApi, invoiceDao, internalCallContextFactory, invoicePluginDispatcher, locker, busService.getBus(), notificationQueueService, invoiceConfig, clock, parkedAccountsManager); }
internalCallContextFactory, invoicePluginDispatcher, locker, busService.getBus(), notificationQueueService, invoiceConfig, clock, parkedAccountsManager);
@Override @BeforeMethod(groups = "slow") public void beforeMethod() throws Exception { if (hasFailed()) { return; } /* We copy the initialization instead of invoking the super method so we can add the registration of the publicBus event; TODO modify sequence to allow optional registration of publicListener */ cleanupAllTables(); log.debug("RESET TEST FRAMEWORK"); controllerDispatcher.clearAll(); overdueConfigCache.loadDefaultOverdueConfig((OverdueConfig) null); clock.resetDeltaFromReality(); busHandler.reset(); // Start services publicListener = new PublicListener(); lifecycle.fireStartupSequencePriorEventRegistration(); busService.getBus().register(busHandler); externalBus.register(publicListener); lifecycle.fireStartupSequencePostEventRegistration(); paymentPlugin.clear(); this.externalBusCount = new AtomicInteger(0); }