In this pattern, a request is wrapped as a command within an object and sent to the invoker. The invoker object routes the command to the relevant object that can handle it, and that object executes the command.
Examples of command design patterns include:
The classes, interfaces, & objects in the above UML class diagram are defined as follows.
The Command Design Pattern is applicable in the following cases: