public interface DataConverter
Modifier and Type | Method and Description |
---|---|
static java.lang.Object[] |
arrayFromPayloads(DataConverter converter,
java.util.Optional<io.temporal.api.common.v1.Payloads> content,
java.lang.Class<?>[] parameterTypes,
java.lang.reflect.Type[] genericParameterTypes) |
<T> T |
fromPayload(io.temporal.api.common.v1.Payload payload,
java.lang.Class<T> valueClass,
java.lang.reflect.Type valueType) |
<T> T |
fromPayloads(int index,
java.util.Optional<io.temporal.api.common.v1.Payloads> content,
java.lang.Class<T> parameterType,
java.lang.reflect.Type genericParameterType)
Implements conversion of an array of values of different types.
|
static DataConverter |
getDefaultInstance() |
<T> java.util.Optional<io.temporal.api.common.v1.Payload> |
toPayload(T value) |
java.util.Optional<io.temporal.api.common.v1.Payloads> |
toPayloads(java.lang.Object... values)
Implements conversion of a list of values.
|
static DataConverter getDefaultInstance()
<T> java.util.Optional<io.temporal.api.common.v1.Payload> toPayload(T value)
<T> T fromPayload(io.temporal.api.common.v1.Payload payload, java.lang.Class<T> valueClass, java.lang.reflect.Type valueType)
java.util.Optional<io.temporal.api.common.v1.Payloads> toPayloads(java.lang.Object... values) throws DataConverterException
values
- Java values to convert to String.DataConverterException
- if conversion of the value passed as parameter failed for any
reason.<T> T fromPayloads(int index, java.util.Optional<io.temporal.api.common.v1.Payloads> content, java.lang.Class<T> parameterType, java.lang.reflect.Type genericParameterType) throws DataConverterException
index
- index of the value in the payloadscontent
- serialized value to convert to Java objects.parameterType
- type of the parameter stored in the contentgenericParameterType
- generic type of the parameter stored in the contentDataConverterException
- if conversion of the data passed as parameter failed for any
reason.static java.lang.Object[] arrayFromPayloads(DataConverter converter, java.util.Optional<io.temporal.api.common.v1.Payloads> content, java.lang.Class<?>[] parameterTypes, java.lang.reflect.Type[] genericParameterTypes) throws DataConverterException
DataConverterException