Added a getDefaultPollInterval() method and a "default-default" value of 1000 (1 second).
This commit is contained in:
@@ -53,11 +53,19 @@ public abstract class AbstractPollingInboundChannelAdapterParser extends Abstrac
|
||||
}
|
||||
}
|
||||
else {
|
||||
adapterBuilder.addPropertyValue("schedule", new PollingSchedule(0));
|
||||
adapterBuilder.addPropertyValue("schedule", new PollingSchedule(this.getDefaultPollInterval()));
|
||||
}
|
||||
return adapterBuilder.getBeanDefinition();
|
||||
}
|
||||
|
||||
/**
|
||||
* Subclasses may override this to provide the default poll interval (when
|
||||
* no 'schedule' is configured). Otherwise, the value will be 1 second.
|
||||
*/
|
||||
protected int getDefaultPollInterval() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subclasses must implement this method to parse the PollableSource instance
|
||||
* which the created Channel Adapter will poll.
|
||||
|
||||
Reference in New Issue
Block a user