Advanced state machines in Java.