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