The chain of responsibility design pattern