I'm designing a system to handle the keyboard input for my game. To get it more simple, I have a class that has two methods, KeyUp and KeyDown which tell me which key has been pressed, this is already implemented by the library I'm using, now I want to have a way to send that information to the classes that are handling input (I'm using an MCV pattern, those would be the controllers). I've thought of two ways of doing that, both seem valid to me, and I don't know which is better, so I'm asking which would be the best way, in terms of object-oriented design, and if it has any significant impact, also efficiency.
The first way I thought of is having the class which receives the input hold references to all the controllers, and then call some methods of those controller classes in an event-like fashion when a key event is triggered in this class.
The other method is the other way round, the controllers hold a refference to the input handler class, which in this design has some kind of data structure (I was thinking of an EnumMap) that holds the status of all the relevant game keys, and then the controller classes might query the input handler for a key with some getters (just to encapsulate the data structure).
So, that's it, I'd like some help on how to do this. Any comments on which of both is better, or a new design that might be better than this are more than welcome.
Thanks in advance.