Package com.solace.serdes.jsonschema
Class JsonSchemaDeserializer<T>
- java.lang.Object
-
- com.solace.serdes.common.AbstractDeserializer<T,com.networknt.schema.JsonSchema>
-
- com.solace.serdes.jsonschema.JsonSchemaDeserializer<T>
-
- Type Parameters:
T- The type of object this deserializer produces.
- All Implemented Interfaces:
com.solace.serdes.Deserializer<T>,Closeable,AutoCloseable
public class JsonSchemaDeserializer<T> extends AbstractDeserializer<T,com.networknt.schema.JsonSchema>
A deserializer for JsonSchema-formatted data that converts byte arrays into objects of type T. This class extendsAbstractDeserializerand implements the deserialization logic specific to Json schemas. Returns a specific target java object of type T orJsonNodewhen the target deserialized type can be not determined.
JsonSchemaDeserializerdoes not support non-header decoding of schema ID. Must useAbstractDeserializer.deserialize(String, byte[], Map)to ensure the schema ID is available for schema resolution. UsingAbstractDeserializer.deserialize(String, byte[])will not resolve the payload schema.
Note: A Vertx connection will be made when configuring thisJsonSchemaDeserializer. Vertx threads are non-daemon and will prevent JVM exit, so always remember to callAbstractDeserializer.close(). Calling close on another thread can orphan requests ensure no calls toAbstractDeserializer.deserialize(String, byte[], Map)are not in progress whenAbstractDeserializer.close()is called.
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaDeserializer()Constructs a new JsonSchemaDeserializer with default configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Map<String,?> properties)Configures the deserializer with the given properties.-
Methods inherited from class com.solace.serdes.common.AbstractDeserializer
close, deserialize, deserialize
-
-
-
-
Method Detail
-
configure
public void configure(Map<String,?> properties)
Description copied from class:AbstractDeserializerConfigures the deserializer with the given properties. Properties are defined inSerdeProperties
Note: A Vertx connection will be made when configuring thisDeserializer. Vertx threads are non-daemon and will prevent JVM exit, so always remember to callDeserializer.close().- Specified by:
configurein interfacecom.solace.serdes.Deserializer<T>- Overrides:
configurein classAbstractDeserializer<T,com.networknt.schema.JsonSchema>- Parameters:
properties- A Map containing configuration properties.- See Also:
SerdeProperties
-
-