Interface Serializer<PayloadType>

Type Parameters:
PayloadType - type of the payload to serialize
All Known Implementing Classes:
BufferSerializer, CollectionSerializer, JsonArraySerializer, JsonObjectSerializer, NumberSerializer, ObjectSerializer, StringSerializer

public interface Serializer<PayloadType>
Reactive http connector serializer. Serializes given payload to a Buffer The serializers are sorted by Priority. If more than one says that it handles(Object) the ones with the highest priority is used
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    default serializer priority
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    From serializers that can handle a specific payload, the one with the higher priority is used.
    boolean
    handles(Object payload)
    if the serializer can handle given payload
    io.vertx.core.buffer.Buffer
    serialize the payload
  • Field Details

    • DEFAULT_PRIORITY

      static final int DEFAULT_PRIORITY
      default serializer priority
      See Also:
  • Method Details

    • handles

      boolean handles(Object payload)
      if the serializer can handle given payload
      Parameters:
      payload - the payload
      Returns:
      true iff the seralizer can handle the payload
    • serialize

      io.vertx.core.buffer.Buffer serialize(PayloadType payload)
      serialize the payload
      Parameters:
      payload - object to serialize
      Returns:
      a buffer with serialized payload
    • getPriority

      default int getPriority()
      From serializers that can handle a specific payload, the one with the higher priority is used.
      Returns:
      the priority of the serializer