public final class ProtobufJsonPayloadConverter extends java.lang.Object implements PayloadConverter
Constructor and Description |
---|
ProtobufJsonPayloadConverter() |
ProtobufJsonPayloadConverter(com.google.protobuf.util.JsonFormat.Printer printer,
com.google.protobuf.util.JsonFormat.Parser parser) |
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 ProtobufJsonPayloadConverter()
public ProtobufJsonPayloadConverter(com.google.protobuf.util.JsonFormat.Printer printer, com.google.protobuf.util.JsonFormat.Parser parser)
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.