Class TimeRangeAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.query.TimeRangeAdapter
- All Implemented Interfaces:
BinaryAdapter<TimeRange>,BinaryDeserializer<TimeRange>,BinarySerializer<TimeRange>
-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) Decodes a byte array into aTimeRangeobject.byte[]encode(TimeRange any, SerializationContext context) Encodes aTimeRangeobject into a byte array.static TimeRangeAdapterRetrieves the singleton instance of theTimeRangeAdapter.
-
Method Details
-
getInstance
Retrieves the singleton instance of theTimeRangeAdapter.- Returns:
- The singleton instance of
TimeRangeAdapter.
-
decode
public TimeRange decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException Decodes a byte array into aTimeRangeobject.- Specified by:
decodein interfaceBinaryDeserializer<TimeRange>- Parameters:
serialized- The byte array containing the serializedTimeRange.context- TheDeserializationContextfor the operation.- Returns:
- The deserialized
TimeRangeobject. - Throws:
ProtoSerializationException- If an error occurs during deserialization.
-
encode
public byte[] encode(TimeRange any, SerializationContext context) throws ProtoSerializationException Encodes aTimeRangeobject into a byte array.- Specified by:
encodein interfaceBinarySerializer<TimeRange>- Parameters:
any- TheTimeRangeobject to encode.context- TheSerializationContextfor the operation.- Returns:
- A byte array representing the serialized
TimeRange. - Throws:
ProtoSerializationException- If an error occurs during serialization.
-