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.
  • Enum Constant Details

    • AVRO

      public static final SerializerProperties.SerializerType AVRO
      Uses Avro based serializer to serialize objects into bytes as specified by Avro Specification using single object encoding.
    • XSTREAM

      public static final SerializerProperties.SerializerType 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

      public static final SerializerProperties.SerializerType JACKSON
      Uses Jackson 2's ObjectMapper to 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

      public static final SerializerProperties.SerializerType JACKSON3
      Uses Jackson 3's ObjectMapper to 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

      public static final SerializerProperties.SerializerType CBOR
      Uses Jackson's CBORMapper to 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 the byte[] to a String will corrupt the data.
    • JAVA

      public static final SerializerProperties.SerializerType JAVA
      Uses the Java Serialization API (see ObjectOutputStream) 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

      public static final SerializerProperties.SerializerType 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

      public static SerializerProperties.SerializerType[] 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

      public static SerializerProperties.SerializerType valueOf(String name)
      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 name
      NullPointerException - if the argument is null