I need to handle events of two different types but I\'m running into the following issue:
The interface EventListener cannot be implemented more than once with diffe
There is only one handle(Object) method in reality. You are effectively write the same as
public class CompositeListener implements EventListener {
public void handle(Object event) {
if (event instanceof PriceUpdate) {
///
} else if (event instanceof OrderEvent) {
///
}
}
}
Without this checking logic, you can't effectively call your event listener in any case.