public class ReceivingDestination extends AbstractDestination
Destination
that simply wraps a supplied Receiver
The supplied Receiver
will be wrapped in a sequence normalizer unless requested
otherwise. Specifically, it is wrapped unless the method acceptsRawOutput()
returns true.
helper
Constructor and Description |
---|
ReceivingDestination(Receiver target)
Create a
ReceivingDestination that wraps a supplied Receiver |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsRawOutput()
Ask whether this receiver accepts raw output, that is, an arbitrary sequence of items
not necessarily forming an XML document or element tree.
|
void |
close()
Close the destination, allowing resources to be released.
|
Receiver |
getReceiver(PipelineConfiguration pipe,
SerializationProperties properties)
Get a
Receiver to which events may be sent. |
closeAndNotify, getDestinationBaseURI, onClose, setDestinationBaseURI
public ReceivingDestination(Receiver target)
ReceivingDestination
that wraps a supplied Receiver
target
- the supplied Receiver
. This must accept a regular event sequence
as defined in RegularSequenceChecker
public Receiver getReceiver(PipelineConfiguration pipe, SerializationProperties properties)
Receiver
to which events may be sent. For this implementation, this
will be the wrapped Receiver
.pipe
- The Saxon configuration. Not used in this implementation.properties
- The required serialization properties (not used)Receiver
public boolean acceptsRawOutput()
Receiver
is an instance of SequenceNormalizer
Receiver
implements ReceiverWithOutputProperties
,
and a call on getOutputProperties(SaxonOutputPropertes.REQUIRE_WELL_FORMED)
returns "no"ReceivingDestination
,
and returns false.public void close() throws SaxonApiException
Destination
The close()
method should not cause any adverse effects if it is called more than
once. If any other method is called after the close()
call, the results are undefined.
This means that a Destination is not, in general, serially reusable.
If an Destination.onClose(net.sf.saxon.s9api.Action)
action has been associated with the destination,
this will be called after the destination is closed.
SaxonApiException
- if any failure occursCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.