An EventHandler specifies how an Event should be processed. Every Event contains a single EventHandler which is executed upon
consumption from the event queue by the EventProcessor. The EventHandler contains the business logic that
is used to process the Event.
Users are expected to either create their own subclasses that override the
handle_event method. Alternatively,
users can pass a block as part of the constructor. The block will be
executed when handle_event is
invoked.
Processes an Event. This method should be
overridden by a concrete implementation. Alternatively, if a block was
supplied to the constructor of the EventHandler, it will be executed to process
the event.
If this method returns true and this handler is part of a chain
(see ChainEventHandler), subsequent
handlers will be permitted to process the event; otherwise, subsequent
handlers are prevented from processing the Event.
- event
- The Event to be processed.