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 aTimeRange
object.byte[]
encode
(TimeRange any, SerializationContext context) Encodes aTimeRange
object into a byte array.static TimeRangeAdapter
Retrieves 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 aTimeRange
object.- Specified by:
decode
in interfaceBinaryDeserializer<TimeRange>
- Parameters:
serialized
- The byte array containing the serializedTimeRange
.context
- TheDeserializationContext
for the operation.- Returns:
- The deserialized
TimeRange
object. - Throws:
ProtoSerializationException
- If an error occurs during deserialization.
-
encode
public byte[] encode(TimeRange any, SerializationContext context) throws ProtoSerializationException Encodes aTimeRange
object into a byte array.- Specified by:
encode
in interfaceBinarySerializer<TimeRange>
- Parameters:
any
- TheTimeRange
object to encode.context
- TheSerializationContext
for the operation.- Returns:
- A byte array representing the serialized
TimeRange
. - Throws:
ProtoSerializationException
- If an error occurs during serialization.
-