Package net.sf.saxon.s9api
Class DestinationHelper
- java.lang.Object
-
- net.sf.saxon.s9api.DestinationHelper
-
public class DestinationHelper extends java.lang.Object
A helper class for implementing theDestination
interface
-
-
Constructor Summary
Constructors Constructor Description DestinationHelper(Destination helpee)
-
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.util.List<Action>
getListeners()
void
onClose(Action listener)
Register a listener to be notified when this destination is closed
-
-
-
Constructor Detail
-
DestinationHelper
public DestinationHelper(Destination helpee)
-
-
Method Detail
-
onClose
public final void onClose(Action listener)
Register a listener to be notified when this destination is closed- 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 callsclose
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.- Throws:
SaxonApiException
- if the close() method throwsSaxonApiException
.
-
getListeners
public java.util.List<Action> getListeners()
-
-