@Override protected void onInit() { Assert.notNull(this.source, "source must not be null"); Assert.state((this.outputChannelName == null && this.outputChannel != null) || (this.outputChannelName != null && this.outputChannel == null), "One and only one of 'outputChannelName' or 'outputChannel' is required."); super.onInit(); if (this.getBeanFactory() != null) { this.messagingTemplate.setBeanFactory(this.getBeanFactory()); } }
@Override // guarded by super#lifecycleLock protected void doStart() { if (!this.initialized) { onInit(); } this.pollingTask = createPollingTask(); if (isReactive()) { this.pollingFlux = createFluxGenerator(); } else { Assert.state(getTaskScheduler() != null, "unable to start polling, no taskScheduler available"); this.runningTask = getTaskScheduler() .schedule(createPoller(), this.trigger); } }
private TransactionTemplate getTransactionTemplate() { if (!this.initialized) { this.onInit(); } return this.transactionTemplate; }
@Override protected void onInit() { Assert.notNull(this.source, "source must not be null"); Assert.notNull(this.outputChannel, "outputChannel must not be null"); if (this.maxMessagesPerPoll < 0) { // the default is 1 since a source might return // a non-null value every time it is invoked this.setMaxMessagesPerPoll(1); } super.onInit(); }
@Override protected void onInit() { Assert.notNull(this.source, "source must not be null"); Assert.state((this.outputChannelName == null && this.outputChannel != null) || (this.outputChannelName != null && this.outputChannel == null), "One and only one of 'outputChannelName' or 'outputChannel' is required."); super.onInit(); if (this.getBeanFactory() != null) { this.messagingTemplate.setBeanFactory(this.getBeanFactory()); } }
@Override // guarded by super#lifecycleLock protected void doStart() { if (!this.initialized) { this.onInit(); } Assert.state(this.getTaskScheduler() != null, "unable to start polling, no taskScheduler available"); this.runningTask = this.getTaskScheduler().schedule(this.poller, this.trigger); }
@Override // guarded by super#lifecycleLock protected void doStart() { if (!this.initialized) { onInit(); } this.pollingTask = createPollingTask(); if (isReactive()) { this.pollingFlux = createFluxGenerator(); } else { Assert.state(getTaskScheduler() != null, "unable to start polling, no taskScheduler available"); this.runningTask = getTaskScheduler() .schedule(createPoller(), this.trigger); } }