
org.springframework.block.AbstractBlock Maven / Gradle / Ivy
package org.springframework.block;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public abstract class AbstractBlock implements Block {
protected final Log logger = LogFactory.getLog(getClass());
public long timeout;
public AbstractBlock() {
this(0);
}
public AbstractBlock(long timeout) {
this.timeout = timeout;
}
public abstract void eval();
public void run() {
Runnable run = new Runnable() {
public void run() {
try {
eval();
Thread.sleep(1000);
}
catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
};
Thread thread = new Thread(run);
thread.start();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy