Chain of responsibility pattern.