org.axonframework.eventhandling.io
Enum EventMessageType

java.lang.Object
  extended by java.lang.Enum<EventMessageType>
      extended by org.axonframework.eventhandling.io.EventMessageType
All Implemented Interfaces:
Serializable, Comparable<EventMessageType>

public enum EventMessageType
extends Enum<EventMessageType>

Enumeration of supported Message Types by the EventMessageWriter and EventMessageReader.

Since:
2.0
Author:
Allard Buijze

Enum Constant Summary
DOMAIN_EVENT_MESSAGE
          Represents a DomainEventMessage
EVENT_MESSAGE
          Represents an EventMessage which is not a DomainEventMessage
 
Method Summary
static EventMessageType forMessage(EventMessage message)
          Returns the most specific EventMessageType for the given message.
static EventMessageType fromTypeByte(byte typeByte)
          Returns the EventMessageType identified by the given typeByte.
 byte getTypeByte()
          Returns the Type Byte for this EventMessageType.
static EventMessageType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EventMessageType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DOMAIN_EVENT_MESSAGE

public static final EventMessageType DOMAIN_EVENT_MESSAGE
Represents a DomainEventMessage


EVENT_MESSAGE

public static final EventMessageType EVENT_MESSAGE
Represents an EventMessage which is not a DomainEventMessage

Method Detail

values

public static EventMessageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EventMessageType c : EventMessageType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EventMessageType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

forMessage

public static EventMessageType forMessage(EventMessage message)
Returns the most specific EventMessageType for the given message.

Parameters:
message - The message to resolve the type for
Returns:
The EventMessageType for the given message

fromTypeByte

public static EventMessageType fromTypeByte(byte typeByte)
Returns the EventMessageType identified by the given typeByte.

Parameters:
typeByte - The byte representing the EventMessageType
Returns:
the EventMessageType represented by the typeByte, or null if unknown

getTypeByte

public byte getTypeByte()
Returns the Type Byte for this EventMessageType.

Returns:
the byte representing this EventMessageType


Copyright © 2010-2016. All Rights Reserved.