|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.phleisch.app.itsucks.processing.impl.AbstractDataProcessor
de.phleisch.app.itsucks.processing.download.impl.PersistenceProcessor
public class PersistenceProcessor
An data processor which saves the data in an file on the disk.
| Field Summary |
|---|
| Fields inherited from class de.phleisch.app.itsucks.processing.impl.AbstractDataProcessor |
|---|
mChain |
| Constructor Summary | |
|---|---|
PersistenceProcessor()
|
|
| Method Summary | |
|---|---|
void |
abort()
Will be called when the chain is aborted. |
boolean |
canResume()
Supports this data processor resuming? |
protected void |
closeFile(boolean pDeleteFile)
|
void |
finish()
Shutdown the data processor. |
void |
init()
Initializes the data processor. |
boolean |
isConsumer()
'Consumes' (saves, parses etc.) this processor to the data or is it only an filter? |
boolean |
isPreserveDataOnRollback()
Gets if the persistence processor should preserve the file in case of an chain error. |
boolean |
needsDataAsWholeChunk()
Asks the processor if it needs the data from the data retriever in one chunk and not in multiple pieces. |
DataChunk |
process(DataChunk pDataChunk)
Processes the given data chunk. |
void |
resumeAt(long pByteOffset)
Resumes the processing at the given position. |
void |
rollback()
Will be called when the chain is unexpectly aborted. |
void |
setPreserveDataOnRollback(boolean pPreserveDataOnRollback)
Sets if the persistence processor should preserve the file in case of an chain error. |
boolean |
supports(Job pJob)
Returns true if this processor supports the given type of job. |
| Methods inherited from class de.phleisch.app.itsucks.processing.impl.AbstractDataProcessor |
|---|
getProcessorChain, setProcessorChain |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.phleisch.app.itsucks.processing.DataProcessor |
|---|
setProcessorChain |
| Constructor Detail |
|---|
public PersistenceProcessor()
| Method Detail |
|---|
public boolean supports(Job pJob)
DataProcessor
supports in interface DataProcessorsupports in class AbstractDataProcessor
public void init()
throws ProcessingException
DataProcessor
init in interface DataProcessorinit in class AbstractDataProcessorProcessingExceptionpublic boolean canResume()
DataProcessor
canResume in interface DataProcessorpublic void resumeAt(long pByteOffset)
DataProcessor
resumeAt in interface DataProcessorpByteOffset - The offset position in bytes.
public DataChunk process(DataChunk pDataChunk)
throws ProcessingException
DataProcessor
process in interface DataProcessorProcessingExceptionpublic void finish()
DataProcessor
finish in interface DataProcessorfinish in class AbstractDataProcessorpublic void abort()
DataProcessorfinish is also called.
abort in interface DataProcessorabort in class AbstractDataProcessorpublic void rollback()
DataProcessorfinish is also called.
rollback in interface DataProcessorrollback in class AbstractDataProcessorprotected void closeFile(boolean pDeleteFile)
public boolean needsDataAsWholeChunk()
DataProcessor
needsDataAsWholeChunk in interface DataProcessorpublic boolean isConsumer()
DataProcessor
isConsumer in interface DataProcessorpublic boolean isPreserveDataOnRollback()
public void setPreserveDataOnRollback(boolean pPreserveDataOnRollback)
pPreserveDataWhenRollback -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||