DFA with Event Handling Capabilities.