Chain of Responsibility パターン
* 要求に対する処理が完了するまで、要求を受信する複数のオブジェクトをチェーン状につなぎ、 要求を引き続いて処理していくデザインパターン ⇒ プログラム初心者に、実装してもらう時に使えそう * 以下のサイトの例「結婚判定ワークフロー」はイメージしやすい 【判断基準】 ・対象者が16歳以上かどうか ・性別を判定して男子であれば18歳以上かどうか ・仕事を持っているかどうかhttp://thinkit.co.jp/article/937/1/page/0/1
使用実例
* サーブレットフィルタ →言われてみたら、chain.doFilter(request, response) とかで次のフィルタに委譲してるよな。 なお、「サーブレットフィルタ」については、以下を参照のこと。http://blogs.yahoo.co.jp/dk521123/33573064.html
参考文献
http://thinkit.co.jp/article/937/1/page/0/1http://www.itsenka.com/contents/development/designpattern/chain_of_responsibility.html
http://www.techscore.com/tech/DesignPattern/ChainOfResponsibility.html/
http://www.rarestyle.net/main/patterns/chainofresponsibility.aspx