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.

创建专业的图表,一键启用。