Package io.apicurio.registry.serde.avro
Class AvroKafkaSerializer<U>
java.lang.Object
io.apicurio.registry.serde.SchemaResolverConfigurer<T,U>
io.apicurio.registry.serde.AbstractKafkaSerDe<T,U>
io.apicurio.registry.serde.AbstractKafkaSerializer<org.apache.avro.Schema,U>
io.apicurio.registry.serde.avro.AvroKafkaSerializer<U>
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.kafka.common.serialization.Serializer<U>
- Author:
- Ales Justin, Fabian Martinez
-
Field Summary
Fields inherited from class io.apicurio.registry.serde.AbstractKafkaSerDe
headersHandler, idHandler, key, log, MAGIC_BYTEFields inherited from class io.apicurio.registry.serde.SchemaResolverConfigurer
schemaResolver -
Constructor Summary
ConstructorsConstructorDescriptionAvroKafkaSerializer(io.apicurio.registry.resolver.SchemaResolver<org.apache.avro.Schema, U> schemaResolver) AvroKafkaSerializer(io.apicurio.registry.rest.client.RegistryClient client) AvroKafkaSerializer(io.apicurio.registry.rest.client.RegistryClient client, io.apicurio.registry.resolver.strategy.ArtifactReferenceResolverStrategy<org.apache.avro.Schema, U> artifactResolverStrategy, io.apicurio.registry.resolver.SchemaResolver<org.apache.avro.Schema, U> schemaResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoidio.apicurio.registry.resolver.SchemaParser<org.apache.avro.Schema,U> protected voidserializeData(io.apicurio.registry.resolver.ParsedSchema<org.apache.avro.Schema> schema, U data, OutputStream out) protected voidserializeData(org.apache.kafka.common.header.Headers headers, io.apicurio.registry.resolver.ParsedSchema<org.apache.avro.Schema> schema, U data, OutputStream out) Methods inherited from class io.apicurio.registry.serde.AbstractKafkaSerializer
close, serialize, serializeMethods inherited from class io.apicurio.registry.serde.AbstractKafkaSerDe
asLegacyId, configure, getByteBuffer, getIdHandler, isKey, reset, setHeadersHandler, setIdHandlerMethods inherited from class io.apicurio.registry.serde.SchemaResolverConfigurer
configure, getSchemaResolver, setSchemaResolver
-
Constructor Details
-
AvroKafkaSerializer
public AvroKafkaSerializer() -
AvroKafkaSerializer
public AvroKafkaSerializer(io.apicurio.registry.rest.client.RegistryClient client) -
AvroKafkaSerializer
public AvroKafkaSerializer(io.apicurio.registry.resolver.SchemaResolver<org.apache.avro.Schema, U> schemaResolver) -
AvroKafkaSerializer
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.serialization.Serializer<U>- Overrides:
configurein classAbstractKafkaSerializer<org.apache.avro.Schema,U>
-
schemaParser
- Specified by:
schemaParserin classAbstractKafkaSerDe<org.apache.avro.Schema,U> - See Also:
-
serializeData
protected void serializeData(io.apicurio.registry.resolver.ParsedSchema<org.apache.avro.Schema> schema, U data, OutputStream out) throws IOException - Specified by:
serializeDatain classAbstractKafkaSerializer<org.apache.avro.Schema,U> - Throws:
IOException- See Also:
-
io.apicurio.registry.serde.AbstractKafkaSerializer#serializeData(io.apicurio.registry.serde.ParsedSchema, java.lang.Object, java.io.OutputStream)
-
serializeData
protected void serializeData(org.apache.kafka.common.header.Headers headers, io.apicurio.registry.resolver.ParsedSchema<org.apache.avro.Schema> schema, U data, OutputStream out) throws IOException - Specified by:
serializeDatain classAbstractKafkaSerializer<org.apache.avro.Schema,U> - Throws:
IOException- See Also:
-
io.apicurio.registry.serde.AbstractKafkaSerializer#serializeData(org.apache.kafka.common.header.Headers, io.apicurio.registry.serde.ParsedSchema, java.lang.Object, java.io.OutputStream)
-