Package net.sf.saxon.s9api
Class AbstractDestination
java.lang.Object
net.sf.saxon.s9api.AbstractDestination
- All Implemented Interfaces:
Destination
- Direct Known Subclasses:
DOMDestination,NullDestination,RawDestination,ReceivingDestination,SAXDestination,SchemaValidator,Serializer,TeeDestination,XdmDestination,XMLStreamWriterDestination,XQueryEvaluator
An abstract class providing reusable code for implementing the
Destination interface-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClose the destination and notify all registered listeners that it has been closed.Get the base URI of the resource being written to this destinationfinal voidRegister a listener to be notified when this destination is closedvoidsetDestinationBaseURI(URI baseURI) Set the base URI of the resource being written to this destinationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.s9api.Destination
close, getReceiver
-
Field Details
-
helper
-
-
Constructor Details
-
AbstractDestination
public AbstractDestination()
-
-
Method Details
-
setDestinationBaseURI
Set the base URI of the resource being written to this destination- Specified by:
setDestinationBaseURIin interfaceDestination- Parameters:
baseURI- the base URI to be used
-
getDestinationBaseURI
Get the base URI of the resource being written to this destination- Specified by:
getDestinationBaseURIin interfaceDestination- Returns:
- the baseURI, or null if none is known
-
onClose
Register a listener to be notified when this destination is closed- Specified by:
onClosein interfaceDestination- Parameters:
listener- an object to be notified when writing to the destination is successfully completed
-
closeAndNotify
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 callsDestination.close()to close the destination, then it callsConsumer.accept(T)on each of the listeners in turn to notify the fact that it has been closed.- Specified by:
closeAndNotifyin interfaceDestination- Throws:
SaxonApiException- if the close() method throwsSaxonApiException.
-