Mediator design pattern

From ControlTier

Jump to: navigation, search

Contents

Intent

  • Define an object that provides a single interface to recieve an action and dispatch it to a set of subordinate Deployment objects.
  • Abstract the command dispatching algorithm so commands can be invoked on both local and remote Deployments.
  • Offer workflow commands that take advantage of command dispatching to propagate key Deployment commands.

Problem

There is a hierarchy of Deployment objects and we want to control a part of that hierarchy using a single point of control. Some of these objects are local while others are remote, therefore network transparent command execution is needed.

Discussion

In a distributed application, it is typical for a set of Deployments to be treated as a subsystem.

The Mediator provides the means to control the subsystem via a single interface, whether the Deployments are local or remote.

The Mediator also enables a form of loose coupling by exposing standard control actions while dispatching specific actions to subordinates, thus hiding those subordinate actions to higher level workflows.

Structure

Image:mediator-structure.png

The Mediator type inherits the capabilities and relationships from Deployment incorporating command dispatching.

The Mediator is supported by a set of associated MediatorSetting subtypes used to initialize option data to its commands.

Example

Commands

Mediator provides these Life-cycle Control Commands, which dispatch to the Mediator's Deployment resources:

See also:

Install

Dispatches Install command to Deployments

Configure

Dispatches Configure command to Deployments

Deploy

Dispatches Deploy command to Deployments

Packages-Install

Dispatches Packages-Install command to Deployments

Update

Dispatches Update command to Deployments

dispatchCmd

Dispatches any specified command to deployments

Check List

  1. Determine the paramters needed to match the part of the hierarchy commands will be dispatched.

Related Types

Supertype:

Subtypes:

Links

Development