Sequence the data found in the supplied stream, placing the output information into the supplied map.
JBoss DNA's SequencingService determines the sequencers that should be executed by monitoring the changes to one or more
workspaces that it is monitoring. Changes in those workspaces are aggregated and used to determine which sequencers should
be called. If the sequencer implements this interface, then this method is called with the property that is to be sequenced
along with the interface used to register the output. The framework takes care of all the rest.
This operation should report progress to the supplied ProgressMonitor
. At the beginning of the operation, call
ProgressMonitor.beginTask(double, org.jboss.dna.common.i18n.I18n, Object...)
with a meaningful message describing
the operation and a total for the amount of work that will be done by this sequencer. Then perform the sequencing work,
periodically reporting work by specifying the amount of work
that has was just
completed or by creating a subtask
and reporting work against that subtask
monitor.
The implementation should also periodically check whether the operation has been
cancelled
. If this method returns true, the implementation should abort all work as
soon as possible and close any resources that were acquired or opened.
Finally, the implementation should call ProgressMonitor.done()
when the operation has finished.
- Specified by:
sequence
in interface StreamSequencer
- Parameters:
stream
- the stream with the data to be sequenced; never null
output
- the output from the sequencing operation; never null
context
- the context for the sequencing operation; never null
progressMonitor
- the progress monitor that should be kept updated with the sequencer's progress and that should be
frequently consulted as to whether this operation has been cancelled
.- See Also:
StreamSequencer.sequence(java.io.InputStream,
org.jboss.dna.graph.sequencers.SequencerOutput, org.jboss.dna.graph.sequencers.SequencerContext,
org.jboss.dna.common.monitor.ProgressMonitor)