de.phleisch.app.itsucks.processing.impl
Class AbstractDataProcessor

java.lang.Object
  extended by de.phleisch.app.itsucks.processing.impl.AbstractDataProcessor
All Implemented Interfaces:
DataProcessor
Direct Known Subclasses:
AbstractDataParser, FilterFileSizeProcessor, HttpRedirectorProcessor, PersistenceProcessor

public abstract class AbstractDataProcessor
extends java.lang.Object
implements DataProcessor

Basic implementation of an data processor.

Author:
olli

Field Summary
protected  DataProcessorChain mChain
           
 
Constructor Summary
AbstractDataProcessor()
           
 
Method Summary
 void abort()
          Will be called when the chain is aborted.
 void finish()
          Shutdown the data processor.
 DataProcessorChain getProcessorChain()
           
 void init()
          Initializes the data processor.
 void rollback()
          Will be called when the chain is unexpectly aborted.
 void setProcessorChain(DataProcessorChain pChain)
          Sets the processor chain the processor is a part of.
abstract  boolean supports(Job pJob)
          Returns true if this processor supports the given type of job.
 
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
getInfo, process, resumeAt
 

Field Detail

mChain

protected DataProcessorChain mChain
Constructor Detail

AbstractDataProcessor

public AbstractDataProcessor()
Method Detail

supports

public abstract boolean supports(Job pJob)
Description copied from interface: DataProcessor
Returns true if this processor supports the given type of job.

Specified by:
supports in interface DataProcessor
Returns:

init

public void init()
          throws ProcessingException
Description copied from interface: DataProcessor
Initializes the data processor. (Create buffers, open file handles etc.)

Specified by:
init in interface DataProcessor
Throws:
ProcessingException

finish

public void finish()
Description copied from interface: DataProcessor
Shutdown the data processor. (Release buffers, file handles etc.)

Specified by:
finish in interface DataProcessor

abort

public void abort()
Description copied from interface: DataProcessor
Will be called when the chain is aborted. After calling abort, finish is also called.

Specified by:
abort in interface DataProcessor

rollback

public void rollback()
Description copied from interface: DataProcessor
Will be called when the chain is unexpectly aborted. After calling rollback, finish is also called.

Specified by:
rollback in interface DataProcessor

setProcessorChain

public void setProcessorChain(DataProcessorChain pChain)
Description copied from interface: DataProcessor
Sets the processor chain the processor is a part of.

Specified by:
setProcessorChain in interface DataProcessor

getProcessorChain

public DataProcessorChain getProcessorChain()


Copyright © 2010. All Rights Reserved.