|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.eventhandling.scheduling.java.SimpleEventSchedulerFactoryBean
public class SimpleEventSchedulerFactoryBean
Spring FactoryBean that creates a SimpleEventScheduler instance using resources found in the Spring Application Context. The SimpleEventScheduler uses Java's ScheduledExecutorService as scheduling and triggering mechanism.
Note that this mechanism is non-persistent. Scheduled tasks will be lost when the JVM is shut down, unless special measures have been taken to prevent that. For more flexible and powerful scheduling options, seeQuartzEventScheduler
.
Constructor Summary | |
---|---|
SimpleEventSchedulerFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
SimpleEventScheduler |
getObject()
|
Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setEventBus(EventBus eventBus)
Sets the eventBus that scheduled events should be published to. |
void |
setExecutorService(ScheduledExecutorService executorService)
Sets the ExecutorService implementation that monitors the triggers and provides the Threads to publish events. |
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 |
---|
public SimpleEventSchedulerFactoryBean()
Method Detail |
---|
public SimpleEventScheduler getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<SimpleEventScheduler>
Exception
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<SimpleEventScheduler>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<SimpleEventScheduler>
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public void setEventBus(EventBus eventBus)
eventBus
- The EventBus to publish scheduled events topublic void setExecutorService(ScheduledExecutorService executorService)
executorService
- The executor service providing the scheduling and execution resourcespublic void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
- the transaction manager that takes care of transactions around event publicationpublic void setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
DefaultTransactionDefinition
.
Is ignored if no transaction manager is configured.
transactionDefinition
- the TransactionDefinition to use by the transaction managerpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |