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 aMetadataPoint
object.byte[]
encode
(MetadataPoint any, SerializationContext context) Encodes aMetadataPoint
object into a byte array.static MetadataPointAdapter
Retrieves 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 aMetadataPoint
object.- Specified by:
decode
in interfaceBinaryDeserializer<MetadataPoint>
- Parameters:
serialized
- The byte array containing the serializedMetadataPoint
.context
- TheDeserializationContext
for the operation.- Returns:
- The deserialized
MetadataPoint
object. - Throws:
ProtoSerializationException
- If an error occurs during deserialization.
-
encode
Encodes aMetadataPoint
object into a byte array.- Specified by:
encode
in interfaceBinarySerializer<MetadataPoint>
- Parameters:
any
- TheMetadataPoint
object to encode.context
- TheSerializationContext
for the operation.- Returns:
- A byte array representing the serialized
MetadataPoint
.
-