Class LocalizedStringAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.i18n.LocalizedStringAdapter
- All Implemented Interfaces:
BinaryAdapter<LocalizedString>, BinaryDeserializer<LocalizedString>, BinarySerializer<LocalizedString>
Protobuf binary adapter for
LocalizedString, using the HistorianLocalizedStringProto.HistorianLocalizedStringPB
schema.
Three forms round-trip: a raw string (no key; default_val carries the literal, decoded
with LocalizedString.createRaw(String)), a key alone, and a key with params.
Param types are not preserved: each param is serialized with toString() and decoded as
a String, so non-String params reach the format template as strings.
-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) byte[]encode(LocalizedString src, SerializationContext context) static LocalizedStringAdapter
-
Method Details
-
getInstance
-
encode
public byte[] encode(LocalizedString src, SerializationContext context) throws ProtoSerializationException - Specified by:
encodein interfaceBinarySerializer<LocalizedString>- Throws:
ProtoSerializationException
-
decode
public LocalizedString decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException - Specified by:
decodein interfaceBinaryDeserializer<LocalizedString>- Throws:
ProtoSerializationException
-