Class CollectionSerializer
- java.lang.Object
-
- io.quarkus.reactivemessaging.http.runtime.serializers.CollectionSerializer
-
- All Implemented Interfaces:
Serializer<Collection<?>>
public class CollectionSerializer extends Object implements Serializer<Collection<?>>
serializer of collections. Serializes collections to a json string inside a Buffer
-
-
Field Summary
-
Fields inherited from interface io.quarkus.reactivemessaging.http.runtime.serializers.Serializer
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description CollectionSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(Collection<?> payload)
serialize the payload
-
-
-
Method Detail
-
handles
public boolean handles(Object payload)
Description copied from interface:Serializer
if the serializer can handle given payload- Specified by:
handles
in interfaceSerializer<Collection<?>>
- Parameters:
payload
- the payload- Returns:
- true iff the seralizer can handle the payload
-
serialize
public io.vertx.core.buffer.Buffer serialize(Collection<?> payload)
Description copied from interface:Serializer
serialize the payload- Specified by:
serialize
in interfaceSerializer<Collection<?>>
- Parameters:
payload
- object to serialize- Returns:
- a buffer with serialized payload
-
getPriority
public int getPriority()
Description copied from interface:Serializer
From serializers that can handle a specific payload, the one with the higher priority is used.- Specified by:
getPriority
in interfaceSerializer<Collection<?>>
- Returns:
- the priority of the serializer
-
-