UML Composite Structure Diagram Examples
Here we provide some examples of UML composite structure diagrams:
Purpose: The purpose of this diagram is to show internal structure of a bank ATM and relationships between different parts of the ATM.
Summary: Bank ATM is typically made up of several devices such as central processor unit (CPU), cryptoprocessor, memory, customer display, function key buttons (usually located near the display), magnetic and/or smartchip card reader, encrypting PIN Pad, customer receipt printer, vault, modem.
Purpose: Show a simplified composite structure of a non clustered Apache Tomcat 7 web server.
Summary: A Server element represents Catalina servlet container of Apache Tomcat 7 web server. It is a single outermost element in the conf/server.xml configuration file. Server element could contain optional Global Naming Resources component and one or more Services. Each Service element is a composition of Executors and Connectors that share a single Engine component.
Purpose: An example of UML collaboration representing Observer design pattern.
Summary: Observer pattern is a behavioral software design pattern in which a subject maintains a list of subscribers called observers and notifies them of any state changes usually by calling one of their methods. Once state change notification is received observer can request current state of the subject.
Design Pattern - Observer
Observer pattern is a behavioral software design pattern in which a subject maintains a list of subscribers called observers and notifies them of any state changes usually by calling one of their methods. Once state change notification is received observer can request current state of the subject.
An example of collaboration for Observer design pattern is shown below. Two roles of the collaboration - subject and observer - will be played by instances of classifiers typed by Subject and Observer interfaces. These interfaces can be viewed as a projection of the externally observable features of classifiers playing the roles.
Collaboration example - Observer design pattern
The same collaboration could be shown using alternative notation for properties. Collaboration icon is connected to each of the rectangles denoting interfaces that are types of properties of the collaboration. Each line is labeled by the name of the property (role).
Composite structure example - Observer design pattern