Why must events be associated with Java classes? Why not just use parameters or path info?
The advantage of using classes is that we can invoke methods based on interface name, without using reflection. If we were to try to map parameters or path info to “method” event handlers, we would have to either manually build case statements or else invoke the methods using reflection. Neither of these options is particularly desirable.