Interface EventParser<T extends Event>

Type Parameters:
T - the event class this parser handles.
All Known Implementing Classes:
AbstractEventParser, ScheduledEventParser

public interface EventParser<T extends Event>
The contract to implement by any event parser that is going to be registered into the EventParserManager.
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(com.fasterxml.jackson.databind.JsonNode jsonNode)
    Desierialize the given json.
    boolean
    wants(com.fasterxml.jackson.databind.JsonNode jsonNode)
    Returns true if the parser is able to deserialize the given json.
  • Method Details

    • wants

      boolean wants(com.fasterxml.jackson.databind.JsonNode jsonNode)
      Returns true if the parser is able to deserialize the given json.
      Parameters:
      jsonNode - a json.
      Returns:
      true if the given json can be deserialized using this parser.
    • parse

      T parse(com.fasterxml.jackson.databind.JsonNode jsonNode)
      Desierialize the given json.
      Parameters:
      jsonNode - the json to deserialize.
      Returns:
      the event described in the given json.