|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.scheduling.java.SimpleEventScheduler
public class SimpleEventScheduler
An EventScheduler implementation that uses Java's ScheduledExecutorService as scheduling and triggering
mechanism.
QuartzEventScheduler.
QuartzEventScheduler| Constructor Summary | |
|---|---|
SimpleEventScheduler(ScheduledExecutorService executorService,
EventBus eventBus)
Initialize the SimpleEventScheduler using the given executorService as trigger and execution
mechanism, and publishes events to the given eventBus. |
|
SimpleEventScheduler(ScheduledExecutorService executorService,
EventBus eventBus,
UnitOfWorkFactory unitOfWorkFactory)
Initialize the SimpleEventScheduler using the given executorService as trigger and execution
mechanism, and publishes events to the given eventBus. |
|
| Method Summary | |
|---|---|
void |
cancelSchedule(ScheduleToken scheduleToken)
Cancel the publication of a scheduled event. |
ScheduleToken |
schedule(org.joda.time.DateTime triggerDateTime,
Object event)
Schedule the given event for publication at the given triggerDateTime. |
ScheduleToken |
schedule(org.joda.time.Duration triggerDuration,
Object event)
Schedule the given event for publication after the given triggerDuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleEventScheduler(ScheduledExecutorService executorService,
EventBus eventBus)
executorService as trigger and execution
mechanism, and publishes events to the given eventBus.
executorService - The backing ScheduledExecutorServiceeventBus - The Event Bus on which Events are to be published
public SimpleEventScheduler(ScheduledExecutorService executorService,
EventBus eventBus,
UnitOfWorkFactory unitOfWorkFactory)
executorService as trigger and execution
mechanism, and publishes events to the given eventBus. The eventTriggerCallback is
invoked just before and after publication of a scheduled event.
executorService - The backing ScheduledExecutorServiceeventBus - The Event Bus on which Events are to be publishedunitOfWorkFactory - The factory that creates the Unit of Work to manage transactions| Method Detail |
|---|
public ScheduleToken schedule(org.joda.time.DateTime triggerDateTime,
Object event)
EventSchedulerevent for publication at the given triggerDateTime. The returned
ScheduleToken can be used to cancel the planned publication.
The given event may be any object, as well as an EventMessage. In the latter case, the instance
provided is the donor for the payload and Meta Data of the actual message being dispatched. In the former case,
the given event will be wrapped as the payload of an EventMessage.
schedule in interface EventSchedulertriggerDateTime - The moment to trigger publication of the eventevent - The event to publish
public ScheduleToken schedule(org.joda.time.Duration triggerDuration,
Object event)
EventSchedulerevent for publication after the given triggerDuration. The
returned ScheduleToken can be used to cancel the planned publication.
The given event may be any object, as well as an EventMessage. In the latter case, the instance
provided is the donor for the payload and Meta Data of the actual message being dispatched. In the former case,
the given event will be wrapped as the payload of an EventMessage.
schedule in interface EventSchedulertriggerDuration - The amount of time to wait before publishing the eventevent - The event to publish
public void cancelSchedule(ScheduleToken scheduleToken)
EventScheduler
cancelSchedule in interface EventSchedulerscheduleToken - the token returned when the event was scheduled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||