GoF Design Patterns - Chain of Responsibility

類圖 模板。 GoF Design Patterns - Chain of Responsibility (由 Visual Paradigm Online 的類圖軟件製作) 編輯此模板

The chain of responsibility pattern is a behavioral design pattern that we use to implement loose coupling in software design, where requests from a client are passed to a chain of objects to be processed. These requests will be received by a single handler, and the objects in the chain will decide for themselves who will handle the requests. Each of these objects contains some type of command to handle the request. If a particular object cannot handle the request, it will pass the request to the next object in the chain.

If the first handler knows how to process a request and complete it. A request that is fulfilled does not go to other handlers. Second, if none of the handlers can satisfy the request, then the request is discarded.

Here is a class diagram representing the GoF Design Patterns - Chain of Responsibility.

創建專業的圖表,一鍵啟用。