Class SimpleServiceMessageParserCallback

  • All Implemented Interfaces:
    ServiceMessageParserCallback

    public class SimpleServiceMessageParserCallback
    extends java.lang.Object
    implements ServiceMessageParserCallback
    Very simple implementation of service messages parser callback. It collects all parsed service messages and errors.
    Since:
    2019.2
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.text.ParseException> getErrors()  
      java.util.List<ServiceMessage> getMessages()  
      void parseException​(java.text.ParseException parseException, java.lang.String text)
      Called when text looked like service message but parser failed to create service message object from it for some reason.
      void regularText​(java.lang.String text)
      Called for the regular text, i.e.
      void serviceMessage​(ServiceMessage message)
      Called for each parsed service message
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleServiceMessageParserCallback

        public SimpleServiceMessageParserCallback()
    • Method Detail

      • regularText

        public void regularText​(@NotNull
                                java.lang.String text)
        Description copied from interface: ServiceMessageParserCallback
        Called for the regular text, i.e. for the text that does not contain service messages in it.
        Specified by:
        regularText in interface ServiceMessageParserCallback
        Parameters:
        text - test that does not contain service messages in it
      • parseException

        public void parseException​(@NotNull
                                   java.text.ParseException parseException,
                                   @NotNull
                                   java.lang.String text)
        Description copied from interface: ServiceMessageParserCallback
        Called when text looked like service message but parser failed to create service message object from it for some reason.
        Specified by:
        parseException in interface ServiceMessageParserCallback
        Parameters:
        parseException - exception
        text - text that parser failed to parse
      • getMessages

        @NotNull
        public java.util.List<ServiceMessage> getMessages()
      • getErrors

        @NotNull
        public java.util.List<java.text.ParseException> getErrors()