Command

This is a UML class diagram example for the Command design pattern.

Purpose

Encapsulates a request allowing it to be treated as an object. This allows the request to be handled in traditionally object based relationships such as queuing and callbacks.

Use When

  • You need callback functionality.
  • Requests need to be handled at variant times or in variant orders.
  • A history of requests is needed.
  • The invoker should be decoupled from the object handling the invocation.
Import into your Project

Posted by: Shalonda Moran