Added a getDefaultPollInterval() method and a "default-default" value of 1000 (1 second).

This commit is contained in:
Mark Fisher
2008-09-22 00:21:26 +00:00
parent 8ea683b715
commit a35a8e1143

View File

@@ -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.