Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2010-2011. Axon Framework
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.axonframework.domain;
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:

  • DomainEvent: Events that represent a state change of an aggregate.
  • ApplicationEvent: Events that do not represent a state change of an aggregate, but do have an important meaning to the application.
  • SystemEvent: Events that represent a state change or notification of a subsystem. These events typically notify the application that part of it is not available.

Author(s):
Allard Buijze
Since:
0.4
See also:
DomainEvent
ApplicationEvent
SystemEvent
public interface Event extends Serializable {

    
Returns the identifier of this event.

Returns:
the identifier of this event.
    String getEventIdentifier();

    
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.
    DateTime getTimestamp();

    
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
    EventMetaData getMetaData();

    
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
New to GrepCode? Check out our FAQ X