Methods Summary |
---|
public void | interrupt()Interrupts processing thread.
interrupted = true;
loop = false;
thread.interrupt();
|
protected abstract void | process()Processing procedure.
|
public void | run()Implements Runnable .
Accepts and opens connection to client
do {
synchronized (this) {
if (!ready) {
try {
wait();
} catch (InterruptedException e) {
return;
}
}
ready = false;
}
process();
} while (loop);
|
public synchronized void | start()Allows one processing procedure. No processing is performed prior
to this method call. For a repeatedly working processor each
iteration waits for start() .
ready = true;
notify();
|