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 aBuffer
The serializers are sorted by Priority. If more than one says that ithandles(Object)
the ones with the highest priority is used
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PRIORITY
default serializer priority
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getPriority()
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 payloadio.vertx.core.buffer.Buffer
serialize(PayloadType payload)
serialize the payload
-
-
-
Field Detail
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY
default serializer priority- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-