Concrete implemention of an EventHandler
that permits the chaining of EventHandlers so that an Event can be processed by more than one EventHandler. Chained handlers are processed
in the order they were added to the ChainEventHandler. Furthermore,
EventHandlers in the chain have the option of breaking the chain by return
false from their handle_event implementation.
Creates a ChainEventHandler with the
- Zero or more EventHandlers that compose the chain.
Adds an EventHandler to the chain.
EventHandlers are processed in the order they have been added to the chain.
- The EventHandler to add to the chain.
This method is also aliased as
For each EventHandler in the chain, invoke
the handler’s handle_event
method passing it the Event to be processed.
Processing of the chain stops when one of the EventHandler’s handle_event returns false.
This method returns true which also permits a chain to be part of
- The Event to process.
Returns a string representation of the chain which includes the names of
all of the EventHandlers that are part of this chain.