org.axonframework.domain
Interface Event

All Superinterfaces:
Serializable
All Known Subinterfaces:
AggregateDeletedEvent
All Known Implementing Classes:
AggregateSnapshot, ApplicationEvent, DomainEvent, EventBase, ScheduledEvent, SystemEvent

public interface Event
extends Serializable

Base interface for all events in the application. All classes that represent an event should implement this interface.

Consider implementing one of the abstract subclasses to categorize events into one of three categories:

Since:
0.4
Author:
Allard Buijze
See Also:
DomainEvent, ApplicationEvent, SystemEvent

Method Summary
 UUID getEventIdentifier()
          Returns the identifier of this event.
 EventMetaData getMetaData()
          Returns the meta data for this event.
 Serializable getMetaDataValue(String key)
          Returns the value registered in the meta data under the given key.
 org.joda.time.LocalDateTime getTimestamp()
          Returns the timestamp of this event.
 

Method Detail

getEventIdentifier

UUID getEventIdentifier()
Returns the identifier of this event.

Returns:
the identifier of this event.

getTimestamp

org.joda.time.LocalDateTime getTimestamp()
Returns the timestamp of this event. The timestamp is set to the date and time the event was created.

Returns:
the timestamp of this event.

getMetaData

EventMetaData getMetaData()
Returns the meta data for this event. This meta data is a collection of key-value pairs, where the key is a String, and the value is a serializable object.

Returns:
the meta data for this event

getMetaDataValue

Serializable getMetaDataValue(String key)
Returns the value registered in the meta data under the given key. If no value is known for the given key, this method returns null.

Parameters:
key - The key of the meta data entry
Returns:
The value registered under the given key, or null if the key wasn't found


Copyright © 2011. All Rights Reserved.