Calling afterPropertiesSet() in post-processor if an endpoint was created.
This commit is contained in:
@@ -271,25 +271,25 @@ public class DefaultMessageBus implements MessageBus, ApplicationContextAware, A
|
||||
if (source == null) {
|
||||
throw new ConfigurationException("endpoint '" + endpoint + "' has no source");
|
||||
}
|
||||
if (source != null && source instanceof SubscribableSource) {
|
||||
if (source instanceof SubscribableSource) {
|
||||
((SubscribableSource) source).subscribe(endpoint);
|
||||
if (source instanceof PollingDispatcher) {
|
||||
PollingDispatcher poller = (PollingDispatcher) source;
|
||||
this.pollingDispatchers.add(poller);
|
||||
this.taskScheduler.schedule(poller);
|
||||
}
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("activated subscription to channel '"
|
||||
+ source + "' for endpoint '" + endpoint + "'");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (source != null && source instanceof PollableSource) {
|
||||
else if (source instanceof PollableSource) {
|
||||
PollingDispatcher poller = new PollingDispatcher((PollableSource<?>) source, this.defaultPollerSchedule);
|
||||
poller.subscribe(endpoint);
|
||||
this.pollingDispatchers.add(poller);
|
||||
this.taskScheduler.schedule(poller);
|
||||
}
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("activated subscription to channel '"
|
||||
+ source + "' for endpoint '" + endpoint + "'");
|
||||
}
|
||||
}
|
||||
|
||||
private void registerGateway(String name, MessagingGateway gateway) {
|
||||
|
||||
@@ -69,6 +69,7 @@ public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation
|
||||
if (endpoint.getName() == null) {
|
||||
endpoint.setBeanName(this.generateEndpointName(beanName, annotation));
|
||||
}
|
||||
endpoint.afterPropertiesSet();
|
||||
return endpoint;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user