Package org.axonframework.springboot
Enum Class SerializerProperties.SerializerType
java.lang.Object
java.lang.Enum<SerializerProperties.SerializerType>
org.axonframework.springboot.SerializerProperties.SerializerType
- All Implemented Interfaces:
Serializable,Comparable<SerializerProperties.SerializerType>,Constable
- Enclosing class:
SerializerProperties
public static enum SerializerProperties.SerializerType
extends Enum<SerializerProperties.SerializerType>
Enumerates different possible standard serializers, available in Axon.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUses Avro based serializer to serialize objects into bytes as specified by Avro Specification using single object encoding.Uses Jackson'sCBORMapperto serialize objects into CBOR.Defines that the default serializer should be used.Uses Jackson 2'sObjectMapperto serialize objects into JSON.Uses Jackson 3'sObjectMapperto serialize objects into JSON.Uses the Java Serialization API (seeObjectOutputStream) to write objects.Uses the XStream based serializer, which is the default serializer. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static SerializerProperties.SerializerType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVRO
Uses Avro based serializer to serialize objects into bytes as specified by Avro Specification using single object encoding. -
XSTREAM
Uses the XStream based serializer, which is the default serializer. This serializer will serialize an object into XML. The serialized format is not highly interoperable, but the XStream based serializer is capable of serializing just about any object. This makes it a very suitable implementation to use as the "general serializer". -
JACKSON
Uses Jackson 2'sObjectMapperto serialize objects into JSON. Provides highly interoperable JSON output, but does require the objects to adhere to a certain structure. The Jackson based serializer is generally suitable as a Message Serializer. -
JACKSON3
Uses Jackson 3'sObjectMapperto serialize objects into JSON. Provides highly interoperable JSON output, but does require the objects to adhere to a certain structure. The Jackson based serializer is generally suitable as a Message Serializer. -
CBOR
Uses Jackson'sCBORMapperto serialize objects into CBOR. This format is not human-readable, but can save on the size of messages. When using this Serializer, make sure your tables are BLOBs, not CLOBs, as converting thebyte[]to aStringwill corrupt the data. -
JAVA
Uses the Java Serialization API (seeObjectOutputStream) to write objects. The Java serializer's output is not interoperable and should really be only used in very specific cases. It is not recommended to use this serializer as an Event Serializer, as it could cause Events to be stored in format that is difficult to upcast when the structure of Events changes. -
DEFAULT
Defines that the default serializer should be used. For "general serializer", this means an XStream based serializer. For the "message serializer", this means the "general serializer" is used. Similarly, the "event serializer" will default to the "message serializer" (or the "general serializer").
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-