Class ByteArrayToGenericRecordConverter
java.lang.Object
org.axonframework.serialization.avro.ByteArrayToGenericRecordConverter
- All Implemented Interfaces:
ContentTypeConverter<byte[],org.apache.avro.generic.GenericRecord>
public class ByteArrayToGenericRecordConverter
extends Object
implements ContentTypeConverter<byte[],org.apache.avro.generic.GenericRecord>
Content type converter between single-object-encoded bytes and Avro generic record.
- Since:
- 4.11.0
- Author:
- Simon Zambrovski, Jan Galinski
-
Constructor Summary
ConstructorsConstructorDescriptionByteArrayToGenericRecordConverter(org.apache.avro.message.SchemaStore schemaStore) Constructs a content type converter used during deserialization for upcasting, to createGenericRecordfrom single-object-encoded for a given schema. -
Method Summary
-
Constructor Details
-
ByteArrayToGenericRecordConverter
public ByteArrayToGenericRecordConverter(org.apache.avro.message.SchemaStore schemaStore) Constructs a content type converter used during deserialization for upcasting, to createGenericRecordfrom single-object-encoded for a given schema.- Parameters:
schemaStore- schema store to resolve schema from fingerprint.
-
-
Method Details
-
expectedSourceType
Description copied from interface:ContentTypeConverterThe expected type of input data.- Specified by:
expectedSourceTypein interfaceContentTypeConverter<byte[],org.apache.avro.generic.GenericRecord> - Returns:
- the expected data format in IntermediateRepresentation
-
targetType
Description copied from interface:ContentTypeConverterThe returned type of IntermediateRepresentation- Specified by:
targetTypein interfaceContentTypeConverter<byte[],org.apache.avro.generic.GenericRecord> - Returns:
- the output data format in IntermediateRepresentation
-
convert
public org.apache.avro.generic.GenericRecord convert(byte[] singleObjectEncodeBytes) Description copied from interface:ContentTypeConverterConverts the given object into another. Typically, these values are contained by aSerializedObjectinstance.- Specified by:
convertin interfaceContentTypeConverter<byte[],org.apache.avro.generic.GenericRecord> - Parameters:
singleObjectEncodeBytes- the value to convert- Returns:
- the converted value
-