class documentation
class CompositePayloadConverter(PayloadConverter): (source)
Known subclasses: temporalio.converter.DefaultPayloadConverter
Constructor: CompositePayloadConverter(*converters)
Composite payload converter that delegates to a list of encoding payload converters.
Encoding/decoding are attempted on each payload converter successively until it succeeds.
Method | __init__ |
Initializes the data converter. |
Method | from |
Decode values trying each converter. |
Method | to |
Encode values trying each converter. |
Instance Variable | converters |
List of payload converters to delegate to, in order. |
Inherited from PayloadConverter
:
Method | from |
Convert a single payload to a value. |
Method | from |
from_payloads for the temporalio.api.common.v1.Payloads wrapper. |
Method | to |
Convert a single value to a payload. |
Method | to |
to_payloads for the temporalio.api.common.v1.Payloads wrapper. |
Class Variable | default |
Default payload converter. |
overridden in
temporalio.converter.DefaultPayloadConverter
Initializes the data converter.
Parameters | |
*converters:EncodingPayloadConverter | Payload converters to delegate to, in order. |
def from_payloads(self, payloads:
Sequence[ temporalio.api.common.v1.Payload]
, type_hints: Optional[ List[ Type]]
= None) -> List[ Any]
:
(source)
¶
Decode values trying each converter.
See base class. Always returns the same number of values as payloads.
Raises | |
KeyError | Unknown payload encoding |
RuntimeError | Error during decode |
Encode values trying each converter.
See base class. Always returns the same number of payloads as values.
Raises | |
RuntimeError | No known converter |