public class JacksonJsonPayloadConverter extends java.lang.Object implements PayloadConverter
Constructor and Description |
---|
JacksonJsonPayloadConverter() |
JacksonJsonPayloadConverter(com.fasterxml.jackson.databind.ObjectMapper mapper) |
Modifier and Type | Method and Description |
---|---|
<T> T |
fromData(io.temporal.api.common.v1.Payload content,
java.lang.Class<T> valueClass,
java.lang.reflect.Type valueType)
Implements conversion of a single value.
|
java.lang.String |
getEncodingType() |
java.util.Optional<io.temporal.api.common.v1.Payload> |
toData(java.lang.Object value)
Implements conversion of a list of values.
|
public JacksonJsonPayloadConverter()
public JacksonJsonPayloadConverter(com.fasterxml.jackson.databind.ObjectMapper mapper)
public java.lang.String getEncodingType()
getEncodingType
in interface PayloadConverter
public java.util.Optional<io.temporal.api.common.v1.Payload> toData(java.lang.Object value) throws DataConverterException
PayloadConverter
toData
in interface PayloadConverter
value
- Java value to convert.DataConverterException
- if conversion of the value passed as parameter failed for any
reason.public <T> T fromData(io.temporal.api.common.v1.Payload content, java.lang.Class<T> valueClass, java.lang.reflect.Type valueType) throws DataConverterException
PayloadConverter
fromData
in interface PayloadConverter
content
- Serialized value to convert to a Java object.DataConverterException
- if conversion of the data passed as parameter failed for any
reason.