Examples on the Internet, like the example here, confused me about the Command
pattern In most examples the concrete command directly calls one of receiver's methods. Is this the only responsibility of a concrete command? Where does the actual business logic belong? In the execute()
method of concrete command or in some method on the receiver?
Another question is if we want to implement multi threaded command pattern, our thread pool should receive commands from Invoker
and run the execute()
methods of concrete commands? Is my understanding correct?