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