Add class diagram for #113 and to be included in PR #299

This commit is contained in:
Joseph McCarthy 2016-01-03 00:01:43 +00:00
parent 248ea5191a
commit 0c062d3f55
4 changed files with 197 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.9" icons="true" automaticImage="PNG" always-add-relationships="true" generalizations="true"
realizations="true" associations="true" dependencies="true" nesting-relationships="true" router="FAN">
<class id="1" language="java" name="com.iluwatar.eda.model.User" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/model/User.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="937" y="618"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="2" language="java" name="com.iluwatar.eda.handler.UserUpdatedEventHandler"
project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/handler/UserUpdatedEventHandler.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="936" y="90"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="3" language="java" name="com.iluwatar.eda.handler.UserCreatedEventHandler"
project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/handler/UserCreatedEventHandler.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="101" width="200" x="41" y="37"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<interface id="4" language="java" name="com.iluwatar.eda.framework.Message" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/framework/Message.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="298" y="189"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="5" language="java" name="com.iluwatar.eda.framework.Handler" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/framework/Handler.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="532" y="89"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="6" language="java" name="com.iluwatar.eda.framework.EventDispatcher" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/framework/EventDispatcher.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="613" y="292"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="7" language="java" name="com.iluwatar.eda.event.UserCreatedEvent" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/event/UserCreatedEvent.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="145" y="618"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="8" language="java" name="com.iluwatar.eda.event.UserUpdatedEvent" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/event/UserUpdatedEvent.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="769" y="455"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="9" language="java" name="com.iluwatar.eda.event.Event" project="event-driven-architecture"
file="/event-driven-architecture/src/main/java/com/iluwatar/eda/event/Event.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="299" y="460"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<dependency id="10">
<bendpoint x="869" y="253"/>
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="8"/>
</dependency>
<dependency id="11">
<bendpoint x="140" y="196"/>
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="9"/>
</dependency>
<dependency id="12">
<bendpoint x="17" y="90"/>
<bendpoint x="17" y="708"/>
<bendpoint x="939" y="703"/>
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="1"/>
</dependency>
<dependency id="13">
<bendpoint x="935" y="318"/>
<bendpoint x="936" y="417"/>
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="1"/>
</dependency>
<dependency id="14">
<bendpoint x="757" y="378"/>
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="9"/>
</dependency>
<generalization id="15">
<end type="SOURCE" refId="7"/>
<end type="TARGET" refId="9"/>
</generalization>
<association id="16">
<end type="SOURCE" refId="8" navigable="false">
<attribute id="17" name="user"/>
<multiplicity id="18" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="1" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<realization id="19">
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="5"/>
</realization>
<dependency id="20">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="9"/>
</dependency>
<dependency id="21">
<bendpoint x="301" y="114"/>
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="4"/>
</dependency>
<realization id="22">
<end type="SOURCE" refId="9"/>
<end type="TARGET" refId="4"/>
</realization>
<dependency id="23">
<end type="SOURCE" refId="6"/>
<end type="TARGET" refId="9"/>
</dependency>
<generalization id="24">
<end type="SOURCE" refId="8"/>
<end type="TARGET" refId="9"/>
</generalization>
<dependency id="25">
<bendpoint x="141" y="250"/>
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="7"/>
</dependency>
<association id="26">
<end type="SOURCE" refId="6" navigable="false">
<attribute id="27" name="handlers">
<position height="19" width="56" x="449" y="175"/>
</attribute>
<multiplicity id="28" minimum="0" maximum="2147483647">
<position height="17" width="23" x="574" y="173"/>
</multiplicity>
</end>
<end type="TARGET" refId="5" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<association id="29">
<end type="SOURCE" refId="7" navigable="false">
<attribute id="30" name="user"/>
<multiplicity id="31" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="1" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<realization id="32">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="5"/>
</realization>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="true" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</classifier-display>
<association-display labels="true" multiplicity="true"/>
</class-diagram>

View File

@ -6,7 +6,7 @@ permalink: /patterns/event-driven-architecture
**Intent:** Send and notify state changes of your objects to other applications using an Event-driven Architecture.
![alt text](./etc/class_diagram.png "Event Driven Architecture")
![alt text](./etc/eda.png "Event Driven Architecture")
**Applicability:** Use an Event-driven architecture when