Interface ParserService


  • public interface ParserService
    The ParserService provides methods to serialize and deserialize OpenMUC records.
    • 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
      • deserialize

        Record deserialize​(byte[] byteArray,
                           ChannelSettings channelSettings)
        Deserializes a given JSON-String as byte array to Record. The format of the byte array depends on the concrete implementation of this service.
        Parameters:
        byteArray - received JSON-String
        channelSettings - defines the channelSettings, to define encapsulated values of e.g. a received JSON-String ChannelSettings
        Returns:
        deserialized instance of Record