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