Package com.solace.serdes
Interface Deserializer<T>
-
- Type Parameters:
T- Generic type argument for the output object ondeserialize(String, byte[], Map)ordeserialize(String, byte[])
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
StringDeserializer
public interface Deserializer<T> extends Closeable
Interface to convert serialized payload bytes into pojo objects.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Closes thisDeserializerdefault voidconfigure(Map<String,?> properties)Configures thisDeserializerTdeserialize(String destinationName, byte[] payload)Deserialize payload bytes into business object of type Tdefault Tdeserialize(String destinationName, byte[] payload, Map<String,Object> headers)Deserialize payload bytes and headers into business object of type T
-
-
-
Method Detail
-
configure
default void configure(Map<String,?> properties)
Configures thisDeserializer- Parameters:
properties- the configuration properties- Since:
- 1.0
-
close
default void close() throws IOExceptionCloses thisDeserializer- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- Since:
- 1.0
-
deserialize
T deserialize(String destinationName, byte[] payload)
Deserialize payload bytes into business object of type T- Parameters:
destinationName- The topic or queue name to route the object.payload- The byte[] of payload from carrier to deserialize into an object of type T.- Returns:
- constructed object of type T from byte[] of payload
- Since:
- 1.0
-
deserialize
default T deserialize(String destinationName, byte[] payload, Map<String,Object> headers)
Deserialize payload bytes and headers into business object of type T- Parameters:
destinationName- The topic or queue name to route the object.payload- The byte[] of payload from carrier to deserialize into an object of type T.headers- Defines additional headers to not include in the payload bytes, this can be an in/out parameter and can be modified on call to deserialize if present.- Returns:
- constructed object of type T from byte[] of payload and headers
- Since:
- 1.0
-
-