org.axonframework.eventhandling.scheduling.quartz
Class QuartzEventSchedulerFactoryBean

java.lang.Object
  extended by org.axonframework.eventhandling.scheduling.quartz.QuartzEventSchedulerFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.FactoryBean<QuartzEventScheduler>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class QuartzEventSchedulerFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<QuartzEventScheduler>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

Spring FactoryBean that creates a QuartzEventScheduler instance using resources found in the Spring Application Context. The QuartzEventScheduler delegates the actual scheduling and triggering to a Quartz Scheduler, making it more suitable for long-term triggers and triggers that must survive a system restart.

Since:
1.1
Author:
Allard Buijze

Constructor Summary
QuartzEventSchedulerFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 QuartzEventScheduler getObject()
           
 Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setEventBus(EventBus eventBus)
          Sets the event bus to which scheduled events need to be published.
 void setEventJobDataBinder(EventJobDataBinder eventJobDataBinder)
          Sets the EventJobDataBinder instance which reads / writes the event message to publish to the JobDataMap.
 void setGroupIdentifier(String groupIdentifier)
          Sets the group identifier to use when scheduling jobs with Quartz.
 void setScheduler(org.quartz.Scheduler scheduler)
          Sets the backing Quartz Scheduler for this timer.
 void setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
          The TransactionDefinition to use by the transaction manager.
 void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
          Sets the transaction manager that manages the transaction around the publication of an event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuartzEventSchedulerFactoryBean

public QuartzEventSchedulerFactoryBean()
Method Detail

getObject

public QuartzEventScheduler getObject()
                               throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<QuartzEventScheduler>
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<QuartzEventScheduler>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<QuartzEventScheduler>

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

setScheduler

public void setScheduler(org.quartz.Scheduler scheduler)
Sets the backing Quartz Scheduler for this timer.

Parameters:
scheduler - the backing Quartz Scheduler for this timer

setEventBus

public void setEventBus(EventBus eventBus)
Sets the event bus to which scheduled events need to be published.

Parameters:
eventBus - the event bus to which scheduled events need to be published.

setGroupIdentifier

public void setGroupIdentifier(String groupIdentifier)
Sets the group identifier to use when scheduling jobs with Quartz. Defaults to "AxonFramework-Events".

Parameters:
groupIdentifier - the group identifier to use when scheduling jobs with Quartz

setEventJobDataBinder

public void setEventJobDataBinder(EventJobDataBinder eventJobDataBinder)
Sets the EventJobDataBinder instance which reads / writes the event message to publish to the JobDataMap. Defaults to QuartzEventScheduler.DirectEventJobDataBinder.

Parameters:
eventJobDataBinder - to use

setTransactionManager

public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Sets the transaction manager that manages the transaction around the publication of an event. If a transaction manager is not specified, no transactions are managed around the event publication.

Parameters:
transactionManager - the transaction manager that takes care of transactions around event publication

setTransactionDefinition

public void setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
The TransactionDefinition to use by the transaction manager. Defaults to a DefaultTransactionDefinition. Is ignored if no transaction manager is configured.

Parameters:
transactionDefinition - the TransactionDefinition to use by the transaction manager


Copyright © 2010-2016. All Rights Reserved.