Introducing the Chain of Responsibility design pattern

The Chain of Responsibility pattern is a behavioral design pattern that enables an object to send a request along a chain of handlers until one of them handles it.