Behavioral design pattern: Watch a Java implementation of the Chain of Responsibility Pattern which passes a request/command along a chain of potential handlers/processors until one of them handles request. In this example a chain of logging objects can log to either file, database or console. The client sends a command to the chain and it runs down the chain until a processor can handle the requested logging type. Bonus info: The Chain of Responsibility Design Pattern is also one of the Gang of Four design patterns.
Top comments (0)