The Command design pattern provides a solution:
Encapsulate a request in a separate Command object.
A class delegates a request to a Command object
and doesn't know (is independent of) how the request performed.
Describing the Command design in more detail is the theme of the following sections.
See Applicability section for all problems Command can solve.

Background Information