Class RawQueryOptionsAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.query.RawQueryOptionsAdapter
- All Implemented Interfaces:
BinaryAdapter<RawQueryOptions>,BinaryDeserializer<RawQueryOptions>,BinarySerializer<RawQueryOptions>
A binary adapter for serializing and deserializing
RawQueryOptions objects.
This class provides methods to encode a RawQueryOptions into a byte array
and decode a byte array back into a RawQueryOptions. It uses Protocol Buffers
for serialization and deserialization.
-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) Decodes a byte array into aRawQueryOptionsobject.byte[]encode(RawQueryOptions any, SerializationContext context) Encodes aRawQueryOptionsobject into a byte array.static RawQueryOptionsAdapterRetrieves the singleton instance of theRawQueryOptionsAdapter.
-
Method Details
-
getInstance
Retrieves the singleton instance of theRawQueryOptionsAdapter.- Returns:
- The singleton instance of
RawQueryOptionsAdapter.
-
decode
public RawQueryOptions decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException Decodes a byte array into aRawQueryOptionsobject.- Specified by:
decodein interfaceBinaryDeserializer<RawQueryOptions>- Parameters:
serialized- The byte array containing the serializedRawQueryOptions.context- TheDeserializationContextfor the operation.- Returns:
- The deserialized
RawQueryOptionsobject. - Throws:
ProtoSerializationException- If an error occurs during deserialization.
-
encode
public byte[] encode(RawQueryOptions any, SerializationContext context) throws ProtoSerializationException Encodes aRawQueryOptionsobject into a byte array.- Specified by:
encodein interfaceBinarySerializer<RawQueryOptions>- Parameters:
any- TheRawQueryOptionsobject to encode.context- TheSerializationContextfor the operation.- Returns:
- A byte array representing the serialized
RawQueryOptions. - Throws:
ProtoSerializationException- If an error occurs during serialization.
-