public abstract class BaseInputProcessor<J> extends Object implements InputProcessor<J>
| Constructor and Description |
|---|
BaseInputProcessor() |
BaseInputProcessor(InputProcessorListenerNotifyFinishedJob<J> listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Called when processing of the input is finished or interrupted.
|
protected abstract boolean |
isInterrupted() |
void |
process()
Process all currently submitted jobs.
|
protected abstract void |
process(J job) |
void |
submit(J job)
Submit a job to be processed by this manager.
|
public BaseInputProcessor()
public BaseInputProcessor(InputProcessorListenerNotifyFinishedJob<J> listener)
public void submit(J job)
InputProcessorsubmit in interface InputProcessor<J>job - the job to be submittedpublic void process()
throws InterruptedException
InputProcessorprocess in interface InputProcessor<J>InterruptedException - if interrupted during processingpublic void finish()
InputProcessorInputProcessor.process() (but
it is not guaranteed that every call of InputProcessor.process() is followed
with InputProcessor.finish()).finish in interface InputProcessor<J>protected abstract boolean isInterrupted()
protected abstract void process(J job)
Copyright © 2011-2015 Department of Computer Science, University of Oxford. All Rights Reserved.