Quantcast
Channel: Java Code Samples » Old stuff
Viewing all articles
Browse latest Browse all 10

Mediator

$
0
0

Description:

Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently

Benefits:

  •  Decouples colleagues
  •  Simplifies object protocols
  •  Centralizes control

When to use:

  • A set of objects communicate in well-defined but complex ways.
  • You want to customize a behavior that’s distributed between several objects without using subclasses.

Diagram:

 



Viewing all articles
Browse latest Browse all 10

Trending Articles