|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.configuration.support.JobRegistryBeanPostProcessor
public class JobRegistryBeanPostProcessor
A BeanPostProcessor
that registers Job
beans
with a JobRegistry
. Include a bean of this type along
with your job configuration, and use the same
JobRegistry
as a JobLocator
when
you need to locate a JobLocator
to launch.
Constructor Summary | |
---|---|
JobRegistryBeanPostProcessor()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Make sure the registry is set before use. |
void |
destroy()
De-register all the Job instances that were
regsistered by this post processor. |
Object |
postProcessAfterInitialization(Object bean,
String beanName)
If the bean is an instance of Job then register it. |
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
Do nothing. |
void |
setJobRegistry(JobRegistry jobRegistry)
Injection setter for JobRegistry . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobRegistryBeanPostProcessor()
Method Detail |
---|
public void setJobRegistry(JobRegistry jobRegistry)
JobRegistry
.
jobRegistry
- the jobConfigurationRegistry to setpublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public void destroy() throws Exception
Job
instances that were
regsistered by this post processor.
destroy
in interface DisposableBean
Exception
DisposableBean.destroy()
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException
Job
then register it.
postProcessAfterInitialization
in interface BeanPostProcessor
FatalBeanException
- if there is a
DuplicateJobException
.
BeansException
BeanPostProcessor.postProcessAfterInitialization(java.lang.Object,
java.lang.String)
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException
postProcessBeforeInitialization
in interface BeanPostProcessor
BeansException
BeanPostProcessor.postProcessBeforeInitialization(java.lang.Object,
java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |