public class TraceRecordSerializer extends Object implements Serializer<TraceRecord>
| Constructor and Description |
|---|
TraceRecordSerializer() |
| Modifier and Type | Method and Description |
|---|---|
TraceRecord |
clone(TraceRecord origin)
Creates a new value instance and copies the values from
origin to the new instance. |
private static com.fasterxml.jackson.databind.ObjectMapper |
createMapper()
Creates a specific object mapper that allows for lazy default serialization of unknown types
as it is the case for the payload in
TraceRecord. |
TraceRecord |
from(byte[] data)
Deserializes a target value into a source value ("input from external").
|
Class<TraceRecord> |
getType()
The type to be handled by this serializer.
|
byte[] |
to(TraceRecord source)
Translates a source value into a target value ("output to external").
|
private static com.fasterxml.jackson.databind.ObjectMapper createMapper()
TraceRecord.public TraceRecord from(byte[] data) throws IOException
InputTypeTranslatorfrom in interface InputTypeTranslator<byte[],TraceRecord>data - the data to be translated backIOException - in case that serialization failspublic byte[] to(TraceRecord source) throws IOException
OutputTypeTranslatorto in interface OutputTypeTranslator<TraceRecord,byte[]>source - the source value to be translatedIOException - in case that translation failspublic TraceRecord clone(TraceRecord origin) throws IOException
Serializerorigin to the new instance.
Use the SerializerRegistry to implement cloning of nested object values.clone in interface Serializer<TraceRecord>origin - the object to cloneIOException - in case that cloning/serialization operations failpublic Class<TraceRecord> getType()
SerializergetType in interface Serializer<TraceRecord>Copyright © 2022. All rights reserved.