Command mode: encapsulate a request as an object so that you can parameterize the customer with different requests, queue requests or record request logs, and support unrecoverable operations.Command class:1. Command role: declares an abstract interface for all specific command classes. This is an abstract role. 2. Specific command role: defines the weak coupling between a receiver and behavior; implements the execute method and is responsible for calling the corresponding operations accepted. The execute () method is usually called the execution method 3. Customer role: create a specific command object and determine its recipient. 4. requester role: the requester role is responsible for calling command objects to execute requests. The related methods are called Action methods. 5. Recipient role: responsible for implementing and executing a request.Purpose:1. abstract the action to be executed to parameterize the object. 2. Specify, sort, and execute requests at different times. 3. cancelling is supported. 4. Log modification is supported.
<? ConcreteCommand _ construct (-> _ faster ER =-> _ faster er-> _ construct (-> _ name =-> _ name. 'Do action. <br/> '_ construct (-> _ command =-> _ command-> = Consumer Er ('jaky' = ConcreteeCommand (= Invoker (->::?>