com.mtgi.analytics.aop.config.v11
Class SchedulerActivationPostProcessor
java.lang.Object
com.mtgi.analytics.aop.config.v11.SchedulerActivationPostProcessor
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean
public class SchedulerActivationPostProcessor
- extends Object
- implements org.springframework.beans.factory.InitializingBean
Adds a trigger to a Quartz scheduler automatically after a bean factory is initialized.
Note that the source of the scheduler and the trigger does not necessarily
have to be the bean factory that contains this bean. This is intended to assist in
processing of a TemplateBeanDefinitionParser
, in which beans are
defined in a source template factory and then promoted out into a target factory after
transformation.
- See Also:
TemplateBeanDefinitionParser
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchedulerActivationPostProcessor
public SchedulerActivationPostProcessor()
setSourceFactory
public void setSourceFactory(org.springframework.beans.factory.BeanFactory sourceFactory)
setSchedulerName
public void setSchedulerName(String schedulerName)
setTriggerName
public void setTriggerName(String triggerName)
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
registerPostProcessor
public static void registerPostProcessor(org.springframework.beans.factory.xml.ParserContext parseContext,
org.springframework.beans.factory.BeanFactory sourceFactory,
String schedulerName,
String triggerName)
- Convenience method to register a
SchedulerActivationPostProcessor
in the given BeanFactory
parse context with the given properties.
- Parameters:
parseContext
- the target bean factory in this context will have a SchedulerActivationPostProcessor
registeredsourceFactory
- the source for both the named scheduler and trigger instancesschedulerName
- the name of the Quartz Scheduler
in sourceFactory
to usetriggerName
- the name of the Quarty Trigger
in sourceFactory
that must be scheduled
configureTriggerDefinition
public static void configureTriggerDefinition(org.springframework.beans.factory.config.BeanDefinition trigger,
String cronExpression,
String name)
- Convenience method to override a CronTrigger bean definition with the given cron expression
and base name.
unwrapInnerBean
public static org.springframework.beans.factory.config.BeanDefinition unwrapInnerBean(org.springframework.beans.factory.config.BeanDefinition parent,
String property)