net.sf.filePiper.model
Interface FileProcessorEnvironment

All Known Implementing Classes:
ProcessorThread

public interface FileProcessorEnvironment

Interface used by the FileProcessor to interact with its environment.

Author:
BEROL

Method Summary
 ExecutionPhase getCurrentPhase()
          Get the current execution phase of the processor environment.
 OutputStream getOutputStream(InputFileInfo info)
          Get an output stream for writing.
 Pipeline getPipeline()
          Get the object representing the whole file processing pipeline.
 boolean shouldContinue()
          Returns true if the file processing shoud continue, false if it was aborted.
 

Method Detail

getOutputStream

OutputStream getOutputStream(InputFileInfo info)
                             throws IOException
Get an output stream for writing.
The output stream will be created based on the information passed in the info (the proposed name) and the global pipeline output settings.

Parameters:
info - info about the file to create. The proposed name contained in this info can be used to create the final file name if the pipeline is configured to use it.
Returns:
a suitable output stream.
Throws:
IOException

shouldContinue

boolean shouldContinue()
Returns true if the file processing shoud continue, false if it was aborted.
This flag should be checked on a regular basis by the file processor to react when processing is aborted.

Returns:
true if the file processing shoud continue, false if it was aborted.

getPipeline

Pipeline getPipeline()
Get the object representing the whole file processing pipeline.
In general, a FileProcessor does not need to access the Pipeline directly.

Returns:
the object representing the whole file processing pipeline.

getCurrentPhase

ExecutionPhase getCurrentPhase()
Get the current execution phase of the processor environment.

Returns:
the current execution phase of the processor environment.


Copyright © 2010. All Rights Reserved.