/** * Specify the {@link ErrorHandler} to wrap a {@code taskExecutor} * to the {@link org.springframework.integration.util.ErrorHandlingTaskExecutor}. * @param errorHandler the {@link ErrorHandler} to use. * @return the spec. * @see #taskExecutor(Executor) */ public PollerSpec errorHandler(ErrorHandler errorHandler) { this.target.setErrorHandler(errorHandler); return this; }
errorHandler.setDefaultErrorChannelName(errorChannel); errorHandler.setBeanFactory(this.beanFactory); pollerMetadata.setErrorHandler(errorHandler);
/** * Specify the {@link ErrorHandler} to wrap a {@code taskExecutor} * to the {@link org.springframework.integration.util.ErrorHandlingTaskExecutor}. * @param errorHandler the {@link ErrorHandler} to use. * @return the spec. * @see #taskExecutor */ public PollerSpec errorHandler(ErrorHandler errorHandler) { this.target.setErrorHandler(errorHandler); return this; }
/** * Specify the {@link ErrorHandler} to wrap a {@code taskExecutor} * to the {@link org.springframework.integration.util.ErrorHandlingTaskExecutor}. * @param errorHandler the {@link ErrorHandler} to use. * @return the spec. * @see #taskExecutor(Executor) */ public PollerSpec errorHandler(ErrorHandler errorHandler) { this.target.setErrorHandler(errorHandler); return this; }
@Bean(name = PollerMetadata.DEFAULT_POLLER) public PollerMetadata defaultPoller() { PollerMetadata poller = new PollerMetadata(); poller.setTrigger(new PeriodicTrigger(60000)); MessagePublishingErrorHandler errorHandler = new MessagePublishingErrorHandler(); errorHandler.setDefaultErrorChannel(myErrors()); poller.setErrorHandler(errorHandler); return poller; }
/** * Specify the {@link ErrorHandler} to wrap a {@code taskExecutor} * to the {@link org.springframework.integration.util.ErrorHandlingTaskExecutor}. * @param errorHandler the {@link ErrorHandler} to use. * @return the spec. * @see #taskExecutor */ public PollerSpec errorHandler(ErrorHandler errorHandler) { this.target.setErrorHandler(errorHandler); return this; }
errorHandler.setDefaultErrorChannelName(errorChannel); errorHandler.setBeanFactory(this.beanFactory); pollerMetadata.setErrorHandler(errorHandler);