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