{
//This will only get called if there is no config builder configured
Schedule schedule = (Schedule) annotation;
String uri = "quartz://schedule" + UUID.getUUID();
AnnotatedEndpointData epData = new AnnotatedEndpointData(MessageExchangePattern.ONE_WAY, ChannelType.Inbound, annotation);
epData.setProperties(convertProperties(getProperties(schedule)));
//By default the scheduler should only use a single thread
//TODO configure threads
String threads = (String) epData.getProperties().get("threads");
if (threads == null)
{
threads = "1";
epData.getProperties().put("threads", threads);
}
epData.setAddress(uri);
epData.setConnector(getConnector());
//Create event generator job
EventGeneratorJobConfig config = new EventGeneratorJobConfig();
config.setStateful(threads.equals("1"));
epData.getProperties().put(QuartzConnector.PROPERTY_JOB_CONFIG, config);
return epData;
}