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