Interface SaxProducer

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SaxProducer
    Similar to Consumer but permits an IOException or a SAXException to be thrown. Influenced by TriConsumer2E<ContentHandler, IOException, SAXException>
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  SaxProducer.SaxProducerJingAdapter
      Simple adapter for XMLResolver SaxProducer to Jing SaxProducer.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static com.thaiopensource.validate.ValidationDriver.SaxProducer adaptForJing​(SaxProducer saxProducer)
      Adapt the provided XMLResolver SaxProducer to a Jing SaxProducer.
      void produce​(org.xml.sax.ContentHandler contentHandler, org.xml.sax.DTDHandler dtdHandler, org.xml.sax.ErrorHandler errorHandler)
      Causes the producer to process and send SAX events.
    • Method Detail

      • produce

        void produce​(org.xml.sax.ContentHandler contentHandler,
                     org.xml.sax.DTDHandler dtdHandler,
                     org.xml.sax.ErrorHandler errorHandler)
              throws java.io.IOException,
                     org.xml.sax.SAXException
        Causes the producer to process and send SAX events.
        Parameters:
        contentHandler - the Content Handler
        dtdHandler - the DTD handler, or null if absent.
        errorHandler - the error handler, or null if absent.
        Throws:
        java.io.IOException - if an error occurs during processing
        org.xml.sax.SAXException - if a SAXException occurs when calling one of the handlers
      • adaptForJing

        static com.thaiopensource.validate.ValidationDriver.SaxProducer adaptForJing​(SaxProducer saxProducer)
        Adapt the provided XMLResolver SaxProducer to a Jing SaxProducer.
        Parameters:
        saxProducer - the XMLResolver SaxProducer.
        Returns:
        the Jing SaxProducer.