Package org.openmuc.framework.parser.spi
Interface ParserService
-
public interface ParserService
The ParserService provides methods to serialize and deserialize OpenMUC records.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Record
deserialize(byte[] byteArray, ValueType valueType)
Deserializes a given JSON-String as byte array toRecord
.byte[]
serialize(java.util.List<LoggingRecord> openMucRecords)
Serializes a list of LogRecordContainers.byte[]
serialize(LoggingRecord openMucRecord)
Serializes a given java datatype to byte array.
-
-
-
Method Detail
-
serialize
byte[] serialize(LoggingRecord openMucRecord) throws SerializationException
Serializes a given java datatype to byte array. The needed datatype depends on the concrete implementation of this service.- Parameters:
openMucRecord
- logging record for serializing- Returns:
- serialized record as byte array
- Throws:
SerializationException
- when something goes wrong while serializing
-
serialize
byte[] serialize(java.util.List<LoggingRecord> openMucRecords) throws SerializationException
Serializes a list of LogRecordContainers.- Parameters:
openMucRecords
- list of logging records for serializing- Returns:
- serialized records as byte array
- Throws:
SerializationException
- when something goes wrong while serializing
-
-