GoF Command Pattern

Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.

Componentized Command Pattern

PerfectJPattern's componentized version of the Command Pattern provides the following advantages:

  • Parameterizes the Invoker, Command and Receiver with generic parameter and return types. This parameterization allow passing user-defined arguments to the Invoker and therefore to the Command and Receiver; it also support optionally associating a possible Result value out of the execution of the Receiver.

UML Class Design

UML Sequence Diagram