I'm creating a program. As I've been puttering along, I've run into a bit of a snag.
My intention is to have a program that has sort of a brain. I have it as my controller right now. I'll have it get data, reboot and login. I want it to be able to handle an error from a
thread such as file not found. For instance, the computer screen locks up, I want it to see that a lockup occurred in my VM (which I'm alread doing) and do a reboot. It works as I push a button and see an exception in the console, but I'm lazy and I want my computer to do it.
I only have one thread active at a time, so I'm not too worried about sync errors.
What I was thinking about extending ThreadPoolExecutor and creating an actionlistener in an overridden afterExecute. That way, I can look through my actionListener for issues and do a screenshot if it finds one to help me. However, I was reading that I can possible slow the program if I'm running a long process in afterExecute (since it is still a part of the child thread...).
However, as a part of my research, I've found something called Callable. I've never really seen it, so I'm not sure about it. Should I spend more time researching Callable or continue with my current thought?