Is there a way to shutdown an Executor
in Java without first casting it to ExecutorService
? Basically i have a class called Exx
that implements Executor
. I want to shutdown Exx. How would I do that? Essentially, I need to know how to shutdown an Executor
.
EDIT: Example:
class Exx implements Executor{
@Override
public void execute(Runnable r) {
new Thread(r).start();
}
}