Class QualifiedValueAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.common.QualifiedValueAdapter
- All Implemented Interfaces:
BinaryAdapter<QualifiedValue>,BinaryDeserializer<QualifiedValue>,BinarySerializer<QualifiedValue>
A binary adapter for serializing and deserializing
QualifiedValue objects.
This class provides methods to encode a QualifiedValue into a byte array and decode a
byte array back into a QualifiedValue. It uses Protocol Buffers for serialization and
deserialization.
-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) Decodes a byte array into aQualifiedValueobject.byte[]encode(QualifiedValue any, SerializationContext context) Encodes aQualifiedValueobject into a byte array.static QualifiedValueAdapterRetrieves the singleton instance of theQualifiedValueAdapter.
-
Method Details
-
getInstance
Retrieves the singleton instance of theQualifiedValueAdapter.- Returns:
- The singleton instance of
QualifiedValueAdapter.
-
decode
public QualifiedValue decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException Decodes a byte array into aQualifiedValueobject.- Specified by:
decodein interfaceBinaryDeserializer<QualifiedValue>- Parameters:
serialized- The byte array containing the serializedQualifiedValue.context- TheDeserializationContextfor the operation.- Returns:
- The deserialized
QualifiedValueobject. - Throws:
ProtoSerializationException- If an error occurs during deserialization.
-
encode
public byte[] encode(QualifiedValue any, SerializationContext context) throws ProtoSerializationException Encodes aQualifiedValueobject into a byte array.- Specified by:
encodein interfaceBinarySerializer<QualifiedValue>- Parameters:
any- TheQualifiedValueobject to encode.context- TheSerializationContextfor the operation.- Returns:
- A byte array representing the serialized
QualifiedValue. - Throws:
ProtoSerializationException- If an error occurs during serialization.
-