Interface Serializer<PayloadType>
- Type Parameters:
PayloadType- type of the payload to serialize
- All Known Implementing Classes:
BufferSerializer,CollectionSerializer,JakartaJsonArraySerializer,JakartaJsonObjectSerializer,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 -
Method Summary
Modifier and TypeMethodDescriptiondefault intFrom serializers that can handle a specific payload, the one with the higher priority is used.booleanif the serializer can handle given payloadio.vertx.core.buffer.Bufferserialize(PayloadType payload) serialize the payload
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYdefault serializer priority- See Also:
-
-
Method Details
-
handles
if the serializer can handle given payload- Parameters:
payload- the payload- Returns:
- true iff the seralizer can handle the payload
-
serialize
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
-