org.axonframework.domain
Interface EventMetaData

All Known Implementing Classes:
MutableEventMetaData

public interface EventMetaData

Interface towards the meta data properties of an event. Typically, meta-data is information that gives information about the context or origin of an event. Transaction identifiers, the executing user's principal, correlation identifiers are examples of such information.

The meta data of an event will always contain the event identifier and the event creation timestamp.

Note that meta data should be considered immutable from the moment an event is stored in the event store or dispatched on the event bus, whichever comes first.

Since:
0.7
Author:
Allard Buijze

Method Summary
 boolean containsKey(String key)
          Indicates whether the given key has been associated with a value (which includes null).
 Serializable get(String key)
          Returns the value associated with the given key.
 UUID getEventIdentifier()
          Returns the identifier of this event.
 org.joda.time.LocalDateTime getTimestamp()
          Returns the time this event was created.
 Set<String> keySet()
          Returns a Set containing the keys registered in the event's meta data.
 

Method Detail

getTimestamp

org.joda.time.LocalDateTime getTimestamp()
Returns the time this event was created.

Returns:
the time this event was created

getEventIdentifier

UUID getEventIdentifier()
Returns the identifier of this event.

Returns:
the identifier of this event

get

Serializable get(String key)
Returns the value associated with the given key. Returns null if no such key exists, or if the associated value is null. Use containsKey(String) to make this distinction.

Parameters:
key - The key to find the associated value for
Returns:
The value assiciated with the given key, or null if it does not exist

containsKey

boolean containsKey(String key)
Indicates whether the given key has been associated with a value (which includes null).

Parameters:
key - The key to check
Returns:
true if the key is associated with a value, false otherwise.

keySet

Set<String> keySet()
Returns a Set containing the keys registered in the event's meta data.

Returns:
a Set containing the keys registered in the event's meta data


Copyright © 2011. All Rights Reserved.