![Hands-On Design Patterns with Java](https://wfqqreader-1252317822.image.myqcloud.com/cover/688/36698688/b_36698688.jpg)
上QQ阅读APP看书,第一时间看更新
Use case
To demonstrate the chain of responsibility design pattern, we will use the university email scenario briefly mentioned in the previous section. For our example, we design a system that takes incoming emails and searches for specific keywords to help determine which university team the email should be routed to. Specifically, we will account for the following:
![](https://epubservercos.yuewen.com/A2D5A8/19470379708814006/epubprivate/OEBPS/Images/2.jpg?sign=1738800098-TSpmZBCMOkhkC8QoXQ5TJyshAJZUSSTk-0-9e0623d236d9997c85d16ef4ca49635b)
As you can see from the table, we identified handler classes to be implemented in Java. Having individual handlers for each type of email request will improve our application's efficiency.