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 aSourceChangePointobject.byte[]encode(SourceChangePoint any, SerializationContext context) Encodes aSourceChangePointobject into a byte array.static SourceChangePointAdapterRetrieves 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 aSourceChangePointobject.- Specified by:
decodein interfaceBinaryDeserializer<SourceChangePoint>- Parameters:
serialized- The byte array containing the serializedSourceChangePoint.context- TheDeserializationContextfor the operation.- Returns:
- The deserialized
SourceChangePointobject. - Throws:
ProtoSerializationException- If an error occurs during deserialization.
-
encode
public byte[] encode(SourceChangePoint any, SerializationContext context) throws ProtoSerializationException Encodes aSourceChangePointobject into a byte array.- Specified by:
encodein interfaceBinarySerializer<SourceChangePoint>- Parameters:
any- TheSourceChangePointobject to encode.context- TheSerializationContextfor the operation.- Returns:
- A byte array representing the serialized
SourceChangePoint. - Throws:
ProtoSerializationException- If an error occurs during serialization.
-