Class CounterConfigurationParser

  • All Implemented Interfaces:
    ConfigurationParser

    @MetaInfServices
    public class CounterConfigurationParser
    extends java.lang.Object
    implements ConfigurationParser
    Counters configuration parser
    Since:
    9.0
    Author:
    Pedro Ruivo
    • Constructor Detail

      • CounterConfigurationParser

        public CounterConfigurationParser()
    • Method Detail

      • readElement

        public void readElement​(XMLExtendedStreamReader reader,
                                ConfigurationBuilderHolder holder)
                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: ConfigurationParser
        The entry point of a configuration parser which gets passed a XMLExtendedStreamReader positioned at a root element associated with the parser itself according to the registered mapping.
        Specified by:
        readElement in interface ConfigurationParser
        Parameters:
        reader - the XML stream reader
        holder - a holder object used by the parser to maintain state
        Throws:
        javax.xml.stream.XMLStreamException
      • parseConfigurations

        public java.util.List<AbstractCounterConfiguration> parseConfigurations​(java.io.InputStream is)
                                                                         throws javax.xml.stream.XMLStreamException
        Reads a list of counter's configuration from an InputStream.
        Parameters:
        is - the InputStream to read.
        Returns:
        a List of AbstractCounterConfiguration read.
        Throws:
        javax.xml.stream.XMLStreamException - if the xml is malformed.