こんにちは、責任範囲の連鎖について疑問に思っています。
一般に、それ自体にハンドラーがあり、各ハンドラーが機能アクションをそのスーパーバイザーに渡す一般的に使用されるパターンです。
シナリオの例で私が見ているのは次のとおりです。
"Only one related handler is handling the functionality itself and all the other handlers
are just passing through to their supervisor handler."
そのような場合、責任の連鎖パターンに違反しますか?
"Every handler has the responsibility to take an action instead and after that passing
to supervisor.
要約として:
Chain of Responsibility Recommended Scenario:
Handler1(Take No Action) --> Handler2 (Take No Action) --> Handler3(Take All Action)
Chain of Responsibility Wondering Scenario:
Handler1(Take Partial Action) --> Handler2(Take No Action) --> Handler(Take Partial Action)
2 番目のシナリオは、一連の責任に適合していますか、それとも違反していますか?
たとえば、Netty にはハンドラー自体があり、すべてに責任のあるアクションがあり、それらの間で情報を渡します。Netty ハンドラーのメカニズムは、責任の連鎖に適していると言えますか?