Class Transmitter

  • All Implemented Interfaces:
    javax.xml.transform.Source

    public abstract class Transmitter
    extends java.lang.Object
    implements javax.xml.transform.Source
    A Transmitter is a source of events sent to a Receiver. An implementation of this interface can be used in any Saxon interface allowing a Source to be supplied, and allows an input document to be created programmatically in the form of a stream of "push" events send to the supplied Receiver.
    • Constructor Summary

      Constructors 
      Constructor Description
      Transmitter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSystemId()
      Get the system identifier that was set with setSystemId.
      void setSystemId​(java.lang.String systemId)
      Set the system identifier for this Source.
      abstract void transmit​(Receiver receiver)
      Send events to a supplied Receiver
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.xml.transform.Source

        isEmpty
    • Constructor Detail

      • Transmitter

        public Transmitter()
    • Method Detail

      • transmit

        public abstract void transmit​(Receiver receiver)
                               throws XPathException
        Send events to a supplied Receiver
        Parameters:
        receiver - the Receiver to which events should be sent.

        The pipelineConfiguration property of this Receiver is guaranteed to be initialized, providing access to objects such as the Saxon Configuration and NamePool.

        The implementation of this class does not necessarily need to construct Receiver events directly. It can do so, for example, via the StreamWriterToReceiver class, which translates XMLStreamWriter events to Receiver events, or via the ReceivingContentHandler class, which translates SAX ContentHandler events to Receiver events.

        Throws:
        XPathException - if any failure occurs
      • setSystemId

        public void setSystemId​(java.lang.String systemId)
        Set the system identifier for this Source.

        The system identifier is optional if the source does not get its data from a URL, but it may still be useful to provide one. The application can use a system identifier, for example, to resolve relative URIs and to include in error messages and warnings.

        Specified by:
        setSystemId in interface javax.xml.transform.Source
        Parameters:
        systemId - The system identifier as a URL string.
      • getSystemId

        public java.lang.String getSystemId()
        Get the system identifier that was set with setSystemId.
        Specified by:
        getSystemId in interface javax.xml.transform.Source
        Returns:
        The system identifier that was set with setSystemId, or null if setSystemId was not called.