Search in sources :

Example 1 with JobPropertiesEnum

use of com.dangdang.ddframe.job.executor.handler.JobProperties.JobPropertiesEnum in project elastic-job by dangdangdotcom.

the class AbstractJobBeanDefinitionParser method createJobPropertiesBeanDefinition.

private BeanDefinition createJobPropertiesBeanDefinition(final Element element) {
    BeanDefinitionBuilder result = BeanDefinitionBuilder.rootBeanDefinition(JobProperties.class);
    Map<JobPropertiesEnum, String> map = new LinkedHashMap<>(JobPropertiesEnum.values().length, 1);
    map.put(JobPropertiesEnum.EXECUTOR_SERVICE_HANDLER, element.getAttribute(EXECUTOR_SERVICE_HANDLER_ATTRIBUTE));
    map.put(JobPropertiesEnum.JOB_EXCEPTION_HANDLER, element.getAttribute(JOB_EXCEPTION_HANDLER_ATTRIBUTE));
    result.addConstructorArgValue(map);
    return result.getBeanDefinition();
}
Also used : BeanDefinitionBuilder(org.springframework.beans.factory.support.BeanDefinitionBuilder) JobPropertiesEnum(com.dangdang.ddframe.job.executor.handler.JobProperties.JobPropertiesEnum) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

JobPropertiesEnum (com.dangdang.ddframe.job.executor.handler.JobProperties.JobPropertiesEnum)1 LinkedHashMap (java.util.LinkedHashMap)1 BeanDefinitionBuilder (org.springframework.beans.factory.support.BeanDefinitionBuilder)1