The usual idiom would be to pass an Event and let polymorphism handle it all for you.
I see no value in your EventHandler
class without any behavior. Your design, as posed, offers no polymorphic benefit. That's the reason you have to check types. Better to have something like this:
public interface EventHandler {
void handle(Event event);
}
The Visitor pattern (aka "double dispatch") can be a good way to handle this situation.
Or you can try generics:
public class EventHandler {
public <T> void consumeEvent(T event) {
// handler code here, dependent on T
}
}
I don't know if JDK 7 has something new to help you out. Sorry; I'm still stuck on JDK 6.