Spring 5 Design Patterns
上QQ阅读APP看书,第一时间看更新

The UML structure for the Facade design pattern

The classes and objects participating in this pattern are:

  • Facade (BankingServiceFacade)

This is a Facade interface that knows which subsystem classes are responsible for a request. This interface is responsible for delegating client requests to appropriate subsystem objects.

  • Subsystem classes (AccountService, TransferService, PaymentService)

These interfaces are actually subsystem functionalities of the banking process system application. These are responsible for handling processes assigned by the Facade object. No interfaces in this category have a reference to the Facade object; they don't have implementation details of Facade. These are totally independent of Facade objects.

Let's see the following UML diagram for this pattern:

UML diagram for Facade design pattern