Class MessagesParser

    • Constructor Detail

      • MessagesParser

        public MessagesParser​(List<Integer> messages)
        Constructor.
        Parameters:
        messages - list of needed messages
    • Method Detail

      • parse

        public ParsedMessage parse​(EncodedMessage message,
                                   boolean ignoreUnknownMessageTypes)
        Parse one message.
        Parameters:
        message - encoded message to parse
        ignoreUnknownMessageTypes - if true, unknown messages types are silently ignored
        Returns:
        parsed message, or null if parse not possible and ignoreUnknownMessageTypes is true
      • parseMessageNumber

        protected abstract String parseMessageNumber​(EncodedMessage message)
        Parse the message number.
        Parameters:
        message - encoded message to parse
        Returns:
        the message number
      • getMessageType

        protected abstract MessageType getMessageType​(String messageNumber)
        Get the message type corresponding to the message number.
        Parameters:
        messageNumber - String reprensentation of the message number
        Returns:
        the message type