org.semanticweb.elk.util.concurrent.computation
Class DelegatingInputProcessor<J>

java.lang.Object
  extended by org.semanticweb.elk.util.concurrent.computation.DelegatingInputProcessor<J>
Type Parameters:
J -
All Implemented Interfaces:
InputProcessor<J>

public class DelegatingInputProcessor<J>
extends Object
implements InputProcessor<J>

Author:
Pavel Klinov pavel.klinov@uni-ulm.de

Constructor Summary
DelegatingInputProcessor(InputProcessor<J> p)
           
 
Method Summary
 void finish()
          Indicate that processing of the input is finished.
protected  void postProcess()
           
protected  void postSubmit(J job)
           
protected  void preProcess()
           
protected  void preSubmit(J job)
           
 void process()
          Process all currently submitted jobs.
 void submit(J job)
          Submit a job to be processed by this manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingInputProcessor

public DelegatingInputProcessor(InputProcessor<J> p)
Method Detail

submit

public void submit(J job)
Description copied from interface: InputProcessor
Submit a job to be processed by this manager. This method can never fail or be interrupted.

Specified by:
submit in interface InputProcessor<J>
Parameters:
job - the job to be submitted

process

public void process()
             throws InterruptedException
Description copied from interface: InputProcessor
Process all currently submitted jobs. This method is intended to be executed from several threads, therefore it is not guaranteed that all jobs will be processed when the method terminates.

Specified by:
process in interface InputProcessor<J>
Throws:
InterruptedException - if interrupted during processing

finish

public void finish()
Description copied from interface: InputProcessor
Indicate that processing of the input is finished. This method should be eventually called after every call of InputProcessor.process() (but it is not necessary that every call of InputProcessor.process() should be followed by InputProcessor.finish()).

Specified by:
finish in interface InputProcessor<J>

preSubmit

protected void preSubmit(J job)

postSubmit

protected void postSubmit(J job)

preProcess

protected void preProcess()

postProcess

protected void postProcess()


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.