Class PipelineImpl
- java.lang.Object
-
- org.ametys.plugins.extraction.execution.pipeline.impl.PipelineImpl
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Pipeline
class PipelineImpl extends Object implements Pipeline
-
-
Field Summary
Fields Modifier and Type Field Description private static Logger
__AVALON_LOGGER
private static org.slf4j.Logger
__LOGGER
private PipelineDescriptor
_desc
private TransformerHandler
_firstHandler
private TransformerHandler
_lastHandler
private OutputStream
_out
private SourceResolver
_resolver
private PipelineSerializer
_serializer
private List<Source>
_sources
-
Constructor Summary
Constructors Constructor Description PipelineImpl(PipelineDescriptor desc, OutputStream out, SourceResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_checkExists(Source s, String uri)
private FileSource
_checkFileSource(Source source, String uri)
private void
_getTransformerHandler(SAXTransformerFactory stf)
private TransformerHandler
_newTransformerHandler(SAXTransformerFactory stf, Source source)
private void
_release()
void
close()
ContentHandler
getHandler()
Prepare and gets theContentHandler
for this pipeline.void
serialize()
Serializes this pipeline.
-
-
-
Field Detail
-
__LOGGER
private static final org.slf4j.Logger __LOGGER
-
__AVALON_LOGGER
private static final Logger __AVALON_LOGGER
-
_desc
private PipelineDescriptor _desc
-
_out
private OutputStream _out
-
_resolver
private SourceResolver _resolver
-
_firstHandler
private TransformerHandler _firstHandler
-
_lastHandler
private TransformerHandler _lastHandler
-
_serializer
private PipelineSerializer _serializer
-
-
Constructor Detail
-
PipelineImpl
PipelineImpl(PipelineDescriptor desc, OutputStream out, SourceResolver resolver)
-
-
Method Detail
-
getHandler
public ContentHandler getHandler() throws Exception
Description copied from interface:Pipeline
Prepare and gets theContentHandler
for this pipeline.- Specified by:
getHandler
in interfacePipeline
- Returns:
- the
ContentHandler
- Throws:
Exception
- if an error occured
-
_getTransformerHandler
private void _getTransformerHandler(SAXTransformerFactory stf)
-
_newTransformerHandler
private TransformerHandler _newTransformerHandler(SAXTransformerFactory stf, Source source) throws TransformerConfigurationException
-
_checkExists
private void _checkExists(Source s, String uri)
-
_checkFileSource
private FileSource _checkFileSource(Source source, String uri)
-
serialize
public void serialize() throws Exception
Description copied from interface:Pipeline
Serializes this pipeline.Pipeline.getHandler()
method must have been called before, and theContentHandler
must no longer receive any event.
Then, the pipeline must beclosed
.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
_release
private void _release()
-
-