Package io.micronaut.pulsar.schemas.json
Class JsonSchema<T>
java.lang.Object
org.apache.pulsar.client.impl.schema.AbstractSchema<T>
org.apache.pulsar.client.impl.schema.AbstractStructSchema<T>
org.apache.pulsar.client.impl.schema.AvroBaseStructSchema<T>
io.micronaut.pulsar.schemas.json.JsonSchema<T>
- Type Parameters:
T- POJO type to send and receive via Pulsar.
- All Implemented Interfaces:
Cloneable,org.apache.pulsar.client.api.Schema<T>
public class JsonSchema<T>
extends org.apache.pulsar.client.impl.schema.AvroBaseStructSchema<T>
JSON Schema to allow using
JsonMapper from Micronaut instead of shaded one in Pulsar library.- Since:
- 1.0
- Author:
- Haris Secic
-
Field Summary
Fields inherited from class org.apache.pulsar.client.impl.schema.AvroBaseStructSchema
schemaFields inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema
LOG, reader, schemaInfo, schemaInfoProvider, writerFields inherited from interface org.apache.pulsar.client.api.Schema
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP -
Constructor Summary
ConstructorsConstructorDescriptionJsonSchema(org.apache.pulsar.common.schema.SchemaInfo schemaInfo, org.apache.pulsar.client.api.schema.SchemaReader<T> reader, org.apache.pulsar.client.api.schema.SchemaWriter<T> writer) -
Method Summary
Methods inherited from class org.apache.pulsar.client.impl.schema.AvroBaseStructSchema
getAvroSchema, getNativeSchemaMethods inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema
atSchemaVersion, decode, decode, decode, decode, decode, decode, encode, getReader, getSchemaInfo, setReader, setSchemaInfoProvider, setWriterMethods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
cloneMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.client.api.Schema
configureSchemaInfo, requireFetchingSchemaInfo, supportSchemaVersioning, validate
-
Constructor Details
-
JsonSchema
-
-
Method Details
-
of
- Type Parameters:
T- The pojo class to map- Parameters:
pojo- The pojo class to mapjsonMapper- The json mapper to use for mapping- Returns:
- The parsed json schema
- Since:
- 1.1.0
-