|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventScheduler
Interface towards a mechanism capable of scheduling the publication of events. The accuracy of the publication time depends on the exact implementation used.
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 . |
Method Detail |
---|
ScheduleToken schedule(org.joda.time.DateTime triggerDateTime, Object event)
event
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.
triggerDateTime
- The moment to trigger publication of the eventevent
- The event to publish
ScheduleToken schedule(org.joda.time.Duration triggerDuration, Object event)
event
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.
triggerDuration
- The amount of time to wait before publishing the eventevent
- The event to publish
void cancelSchedule(ScheduleToken scheduleToken)
scheduleToken
- the token returned when the event was scheduled
IllegalArgumentException
- if the token belongs to another scheduler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |