Class EventParserManager

java.lang.Object
es.kukenan.smartfi.events.common.spring.EventParserManager

@Component public class EventParserManager extends Object
This components maintains a Event Parser registry and publishes a method (see findParser(JsonNode) to retrieve the proper parser for a given json.
  • Field Details

    • eventParsers

      @Autowired(required=false) private List<EventParser> eventParsers
      The known event parsers.
  • Constructor Details

    • EventParserManager

      public EventParserManager()
  • Method Details

    • findParser

      public EventParser findParser(com.fasterxml.jackson.databind.JsonNode jsonNode)
      Get the parser that can be used to deserialize the given json.
      Parameters:
      jsonNode - the json to parse.
      Returns:
      the first event parser that can deserialize the given json.
    • allParsers

      public List<EventParser> allParsers()
      Get all the known parsers.
      Returns:
      all the parsers registeres at this instance.