Class AbstractDestination

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeAndNotify()
      Close the destination and notify all registered listeners that it has been closed.
      java.net.URI getDestinationBaseURI()
      Get the base URI of the resource being written to this destination
      void onClose​(Action listener)
      Register a listener to be notified when this destination is closed
      void setDestinationBaseURI​(java.net.URI baseURI)
      Set the base URI of the resource being written to this destination
      • Methods inherited from class java.lang.Object

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

      • AbstractDestination

        public AbstractDestination()
    • Method Detail

      • setDestinationBaseURI

        public void setDestinationBaseURI​(java.net.URI baseURI)
        Set the base URI of the resource being written to this destination
        Specified by:
        setDestinationBaseURI in interface Destination
        Parameters:
        baseURI - the base URI to be used
      • getDestinationBaseURI

        public java.net.URI getDestinationBaseURI()
        Get the base URI of the resource being written to this destination
        Specified by:
        getDestinationBaseURI in interface Destination
        Returns:
        the baseURI, or null if none is known
      • onClose

        public final void onClose​(Action listener)
        Register a listener to be notified when this destination is closed
        Specified by:
        onClose in interface Destination
        Parameters:
        listener - an object to be notified when writing to the destination is successfully completed
      • closeAndNotify

        public void closeAndNotify()
                            throws SaxonApiException
        Close the destination and notify all registered listeners that it has been closed. This method is intended for internal use by Saxon. The method first calls Destination.close() to close the destination, then it calls Consumer.accept(T) on each of the listeners in turn to notify the fact that it has been closed.
        Specified by:
        closeAndNotify in interface Destination
        Throws:
        SaxonApiException - if the close() method throws SaxonApiException.