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