public interface ReceiverFactory
| Modifier and Type | Method and Description |
|---|---|
Receiver |
getReceiver(PipelineConfiguration pipe,
SerializationProperties params)
Return a Receiver.
|
Receiver getReceiver(PipelineConfiguration pipe, SerializationProperties params) throws SaxonApiException
pipe - The pipeline configuration. This is supplied so that the destination can
use information from the configuration (for example, a reference to the name pool)
to construct or configure the returned Receiver.params - Serialization parameters known to the caller of the method; typically,
output properties defined in a stylesheet or query. These will mainly
be of interest if the destination is performing serialization, but some
properties (such as item-separator) are also used in other
situations. These properties are typically subordinate to any properties
defined on the (serializer) destination itself: for example if indent=yes
was explicitly specified on a Serializer, this takes precedence
over indent=no defined in a query or stylesheet.receiver.getPipelineConfiguration() returns the supplied PipelineConfiguration.
The Receiver is expected to handle a regular event sequence as defined in
RegularSequenceChecker. It is the caller's responsibility to
ensure that the sequence of calls to the Receiver satisfies these rules, and it
is the responsibility of the implementation to accept any sequence conforming these rules;
the implementation is not expected to check that the sequence is valid, but it can do so
if it wishes by inserting a RegularSequenceChecker into the pipeline.
The sequence of events passed to the Receiver represents the raw results of
the query or transformation. If the destination is to perform sequence normalization,
this is typically done by returning a SequenceNormalizer as the
result of this method.
The returned Receiver is responsible for ensuring that when its Receiver.close()
method is called, this results in all registered onClose actions being invoked.
An implementation returning a SequenceNormalizer can achieve this by registering
the actions with the SequenceNormalizer.onClose(java.util.List<net.sf.saxon.s9api.Action>) method.
SaxonApiException - if the Receiver cannot be createdCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.