org.axonframework.serializer
Class SimpleSerializedObject<T>

java.lang.Object
  extended by org.axonframework.serializer.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 Summary
SimpleSerializedObject(T data, Class<T> dataType, SerializedType serializedType)
          Initializes a SimpleSerializedObject using given data and serializedType.
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.
 
Method Summary
 boolean equals(Object o)
           
 Class<T> getContentType()
          Returns the type of this representation's data.
 T getData()
          The actual data of the serialized object.
 SerializedType getType()
          Returns the description of the type of object contained in the data.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2010-2016. All Rights Reserved.