Class SimpleSerializedObject<T>

java.lang.Object
org.axonframework.serialization.SimpleSerializedObject<T>
Type Parameters:
T - The data type representing the serialized object
All Implemented Interfaces:
SerializedObject<T>
Direct Known Subclasses:
SerializedSaga

public class SimpleSerializedObject<T> extends Object implements SerializedObject<T>
SerializedObject implementation that takes all properties as constructor parameters.
Since:
2.0
Author:
Allard Buijze
  • Constructor Details

    • SimpleSerializedObject

      public SimpleSerializedObject(T data, Class<T> dataType, SerializedType serializedType)
      Initializes a SimpleSerializedObject using given data and serializedType.
      Parameters:
      data - The data of the serialized object
      dataType - The type of data
      serializedType - The type description of the serialized object
    • SimpleSerializedObject

      public SimpleSerializedObject(T data, Class<T> dataType, String type, String revision)
      Initializes a SimpleSerializedObject using given data and a serialized type identified by given type and revision.
      Parameters:
      data - The data of the serialized object
      dataType - The type of data
      type - The type identifying the serialized object
      revision - The revision of the serialized object
  • Method Details

    • getData

      public T getData()
      Description copied from interface: SerializedObject
      The actual data of the serialized object.
      Specified by:
      getData in interface SerializedObject<T>
      Returns:
      the actual data of the serialized object
    • getContentType

      public Class<T> getContentType()
      Description copied from interface: SerializedObject
      Returns the type of this representation's data.
      Specified by:
      getContentType in interface SerializedObject<T>
      Returns:
      the type of this representation's data
    • getType

      public SerializedType getType()
      Description copied from interface: SerializedObject
      Returns the description of the type of object contained in the data.
      Specified by:
      getType in interface SerializedObject<T>
      Returns:
      the description of the type of object contained in the data
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object