org.axonframework.eventhandling.scheduling
Class ScheduledEvent
java.lang.Object
org.axonframework.domain.EventBase
org.axonframework.domain.ApplicationEvent
org.axonframework.eventhandling.scheduling.ScheduledEvent
- All Implemented Interfaces:
- Serializable, Event
public abstract class ScheduledEvent
- extends ApplicationEvent
Abstract implementation of the ApplicationEvent that contains the timestamp of the moment the event is
scheduled for publication.
- Since:
- 0.7
- Author:
- Allard Buijze
- See Also:
- Serialized Form
|
Constructor Summary |
ScheduledEvent(Object source,
org.joda.time.DateTime timestamp)
Initializes a new scheduled event, scheduled for publication at the given timestamp. |
ScheduledEvent(Object source,
org.joda.time.Duration duration)
Initializes a new scheduled event, scheduled for publication after a given duration. |
|
Method Summary |
org.joda.time.DateTime |
getScheduledTime()
The time at which the event is to be published. |
ScheduledEvent
public ScheduledEvent(Object source,
org.joda.time.Duration duration)
- Initializes a new scheduled event, scheduled for publication after a given
duration.
- Parameters:
source - The instance considered the source of this eventduration - The amount of time to wait before publication of the even
ScheduledEvent
public ScheduledEvent(Object source,
org.joda.time.DateTime timestamp)
- Initializes a new scheduled event, scheduled for publication at the given
timestamp.
- Parameters:
source - The instance considered the source of this eventtimestamp - The time at which to publish the event
getScheduledTime
public org.joda.time.DateTime getScheduledTime()
- The time at which the event is to be published. Note that this property should be immutable. If this value
changes the exact behavior is undefined.
- Returns:
- The time at which the event is to be published
Copyright © 2011. All Rights Reserved.