public class StubEventScheduler extends Object implements org.axonframework.eventhandling.scheduling.EventScheduler
| Constructor and Description |
|---|
StubEventScheduler()
Creates an instance of the StubScheduler that uses the current date time as its conceptual "current time".
|
StubEventScheduler(org.joda.time.ReadableInstant currentDateTime)
Creates an instance of the StubScheduler that uses the given
currentDateTime as its conceptual
"current time". |
| Modifier and Type | Method and Description |
|---|---|
List<org.axonframework.domain.EventMessage> |
advanceTime(org.joda.time.DateTime newDateTime)
Advance time to the given
newDateTime and returns all events scheduled for publication until that
time. |
List<org.axonframework.domain.EventMessage> |
advanceTime(org.joda.time.Duration duration)
Advance time by the given
duration and returns all events scheduled for publication until that
time. |
org.axonframework.domain.EventMessage |
advanceToNextTrigger()
Advances the "current time" of the scheduler to the next scheduled Event, and returns that event.
|
void |
cancelSchedule(org.axonframework.eventhandling.scheduling.ScheduleToken scheduleToken) |
org.joda.time.DateTime |
getCurrentDateTime()
Returns the "Current Date Time" as used by the scheduler.
|
List<ScheduledItem> |
getScheduledItems()
Returns a view of all the scheduled Events at the time this method is called.
|
org.axonframework.eventhandling.scheduling.ScheduleToken |
schedule(org.joda.time.DateTime triggerDateTime,
Object event) |
org.axonframework.eventhandling.scheduling.ScheduleToken |
schedule(org.joda.time.Duration triggerDuration,
Object event) |
public StubEventScheduler()
public StubEventScheduler(org.joda.time.ReadableInstant currentDateTime)
currentDateTime as its conceptual
"current time".currentDateTime - The instant to use as current Date and Timepublic org.axonframework.eventhandling.scheduling.ScheduleToken schedule(org.joda.time.DateTime triggerDateTime,
Object event)
schedule in interface org.axonframework.eventhandling.scheduling.EventSchedulerpublic org.axonframework.eventhandling.scheduling.ScheduleToken schedule(org.joda.time.Duration triggerDuration,
Object event)
schedule in interface org.axonframework.eventhandling.scheduling.EventSchedulerpublic void cancelSchedule(org.axonframework.eventhandling.scheduling.ScheduleToken scheduleToken)
cancelSchedule in interface org.axonframework.eventhandling.scheduling.EventSchedulerpublic List<ScheduledItem> getScheduledItems()
public org.joda.time.DateTime getCurrentDateTime()
public org.axonframework.domain.EventMessage advanceToNextTrigger()
public List<org.axonframework.domain.EventMessage> advanceTime(org.joda.time.DateTime newDateTime)
newDateTime and returns all events scheduled for publication until that
time.newDateTime - The time to advance the "current time" of the scheduler topublic List<org.axonframework.domain.EventMessage> advanceTime(org.joda.time.Duration duration)
duration and returns all events scheduled for publication until that
time.duration - The amount of time to advance the "current time" of the scheduler withCopyright © 2010-2013. All Rights Reserved.