Class GlueSchemaRegistryDeserializationFacade
java.lang.Object
com.amazonaws.services.schemaregistry.deserializers.GlueSchemaRegistryDeserializationFacade
- All Implemented Interfaces:
Closeable,AutoCloseable
Protocol agnostic AWS Generic de-serializer
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGlueSchemaRegistryDeserializationFacade(@NonNull GlueSchemaRegistryConfiguration configuration, @NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) GlueSchemaRegistryDeserializationFacade(Map<String, ?> configs, Properties properties, @NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialProvider, AWSSchemaRegistryClient schemaRegistryClient) Constructor accepting various dependencies. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDeserialize(byte[] data) Returns if the given data array can be deserialized.voidclose()Resource clean up for Closeable.deserialize(@NonNull AWSDeserializerInput deserializerInput) De-serializes the given data and returns an Object.byte[]getActualData(byte[] data) getSchema(@lombok.NonNull byte[] data) getSchemaDefinition(@lombok.NonNull byte[] data) Fetches the schema definition for a the serialized data.getSchemaDefinition(@NonNull ByteBuffer buffer) Fetches the schema definition for the serialized data.voidoverrideUserAgentApp(String name) Method to override user-agent app name for the de-serializer.
-
Field Details
-
cache
-
-
Constructor Details
-
GlueSchemaRegistryDeserializationFacade
public GlueSchemaRegistryDeserializationFacade(Map<String, ?> configs, Properties properties, @NonNull @NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialProvider, AWSSchemaRegistryClient schemaRegistryClient) Constructor accepting various dependencies.- Parameters:
configs- configuration mapproperties- configuration propertiescredentialProvider- credentials provider for integrating with schema registry serviceschemaRegistryClient- schema registry client for communicating with schema registry service
-
GlueSchemaRegistryDeserializationFacade
public GlueSchemaRegistryDeserializationFacade(@NonNull @NonNull GlueSchemaRegistryConfiguration configuration, @NonNull @NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider)
-
-
Method Details
-
overrideUserAgentApp
Method to override user-agent app name for the de-serializer. This overrides the previously set value in GlueSchemaRegistryConfiguration.- Parameters:
name- AppName
-
getSchemaDefinition
Fetches the schema definition for the serialized data.- Parameters:
buffer- data for which schema definition is needed as ByteBuffer- Returns:
- schema definition
- Throws:
GlueSchemaRegistryIncompatibleDataException- when data is incompatible with schema registry
-
getActualData
public byte[] getActualData(byte[] data) -
getSchema
-
getSchemaDefinition
Fetches the schema definition for a the serialized data.- Parameters:
data- data for which schema definition is needed as byte array- Returns:
- schema for the passed data
- Throws:
GlueSchemaRegistryIncompatibleDataException- when data is incompatible with schema registry
-
deserialize
public Object deserialize(@NonNull @NonNull AWSDeserializerInput deserializerInput) throws AWSSchemaRegistryException De-serializes the given data and returns an Object. Accepts encapsulated deserializer input.- Parameters:
deserializerInput- Input data object for deserializer- Returns:
- de-serialized object instance
- Throws:
AWSSchemaRegistryException- Exception during de-serialization
-
canDeserialize
public boolean canDeserialize(byte[] data) Returns if the given data array can be deserialized.- Parameters:
data- byte[] of data.- Returns:
- boolean.
-
close
public void close()Resource clean up for Closeable. This method internally shuts down the background thread for publishing cloud watch metrics. After this is called, a new instance of this class should be created to enable the metrics publishing feature.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-