The chain of responsibility pattern is characterized by a chain of receiver objects, each object dealing
with a certain aspect of your application.
A slender object sends a request to an interface, and then the request is passed through the chain
to check the different aspects of it.
The urinal diagram shows exactly that.
We have a handler interface which defines a contract for the concrete handlers, the concrete handlers
will pass the request to each other up in the chain hierarchy.
A typical usage of this would be in a logging component of an application.
You would typically have two classes that deal with authentication and authorization, both of them
being in the same chain generally.
You use this pattern when you want to perform sequential tasks before reaching a final object.
Also, when there needs to be multiple levels of escalation for different handlers, an example would
be a payment processor where you need different types of approvals for different payments that need
to be approved.
Let's have a look at the implementation of this pattern in the current.