diff --git a/message-channel/etc/message-channel.png b/message-channel/etc/message-channel.png new file mode 100644 index 000000000..d29490724 Binary files /dev/null and b/message-channel/etc/message-channel.png differ diff --git a/message-channel/etc/message-channel.ucls b/message-channel/etc/message-channel.ucls new file mode 100644 index 000000000..27e99e539 --- /dev/null +++ b/message-channel/etc/message-channel.ucls @@ -0,0 +1,304 @@ +<?xml version="1.0" encoding="UTF-8"?> +<class-diagram version="1.1.8" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true" + realizations="true" associations="true" dependencies="false" nesting-relationships="true"> + <class id="1" language="java" name="org.apache.camel.builder.RouteBuilder" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="59" width="150" x="1016" y="445"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <interface id="2" language="java" name="org.apache.camel.CamelContext" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="124" x="852" y="445"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <class id="3" language="java" name="org.apache.camel.model.RouteDefinition" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="147" x="324" y="236"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <class id="4" language="java" name="org.apache.camel.model.ProcessorDefinition" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="59" width="215" x="246" y="336"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <class id="5" language="java" name="org.apache.camel.model.OptionalIdentifiedDefinition" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="59" width="243" x="41" y="236"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <interface id="6" language="java" name="org.apache.camel.NamedNode" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="120" x="41" y="336"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <interface id="7" language="java" name="org.apache.camel.model.Block" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="147" x="246" y="445"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <interface id="8" language="java" name="org.apache.camel.RoutesBuilder" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="127" x="1016" y="545"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <class id="9" language="java" name="org.apache.camel.builder.BuilderSupport" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="59" width="150" x="1184" y="336"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <interface id="10" language="java" name="org.apache.camel.SuspendableService" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="172" x="752" y="336"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <interface id="11" language="java" name="org.apache.camel.Service" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="120" x="611" y="236"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <interface id="12" language="java" name="org.apache.camel.RuntimeConfiguration" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="180" x="964" y="336"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <class id="13" language="java" name="org.apache.camel.impl.DefaultCamelContext" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="175" x="752" y="136"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <class id="14" language="java" name="org.apache.camel.support.ServiceSupport" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="59" width="154" x="492" y="37"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </class> + <interface id="15" language="java" name="org.apache.camel.StatefulService" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="134" x="532" y="445"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <interface id="16" language="java" name="org.apache.camel.ShutdownableService" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="180" x="532" y="336"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <interface id="17" language="java" name="org.apache.camel.model.ModelCamelContext" project="message-channel" + file="C:/Users/ilkka/.m2/repository/org/apache/camel/camel-core/2.15.3/camel-core-2.15.3.jar" binary="true" + corner="BOTTOM_RIGHT"> + <position height="60" width="168" x="1187" y="545"/> + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </display> + </interface> + <association id="18"> + <bendpoint x="1196" y="445"/> + <end type="SOURCE" refId="9" navigable="false"> + <attribute id="19" name="context"/> + <multiplicity id="20" minimum="0" maximum="1"/> + </end> + <end type="TARGET" refId="17" navigable="true"/> + <display labels="true" multiplicity="true"/> + </association> + <association id="21"> + <end type="SOURCE" refId="3" navigable="false"> + <attribute id="22" name="outputs"/> + <multiplicity id="23" minimum="0" maximum="2147483647"/> + </end> + <end type="TARGET" refId="4" navigable="true"/> + <display labels="true" multiplicity="true"/> + </association> + <association id="24"> + <end type="SOURCE" refId="13" navigable="false"> + <attribute id="25" name="servicesToClose"/> + <multiplicity id="26" minimum="0" maximum="2147483647"/> + </end> + <end type="TARGET" refId="11" navigable="true"/> + <display labels="true" multiplicity="true"/> + </association> + <generalization id="27"> + <end type="SOURCE" refId="3"/> + <end type="TARGET" refId="4"/> + </generalization> + <generalization id="28"> + <end type="SOURCE" refId="15"/> + <end type="TARGET" refId="10"/> + </generalization> + <generalization id="29"> + <end type="SOURCE" refId="16"/> + <end type="TARGET" refId="11"/> + </generalization> + <generalization id="30"> + <end type="SOURCE" refId="2"/> + <end type="TARGET" refId="12"/> + </generalization> + <generalization id="31"> + <end type="SOURCE" refId="13"/> + <end type="TARGET" refId="14"/> + </generalization> + <generalization id="32"> + <end type="SOURCE" refId="17"/> + <end type="TARGET" refId="2"/> + </generalization> + <generalization id="33"> + <end type="SOURCE" refId="1"/> + <end type="TARGET" refId="9"/> + </generalization> + <association id="34"> + <end type="SOURCE" refId="4" navigable="false"> + <attribute id="35" name="blocks"/> + <multiplicity id="36" minimum="0" maximum="2147483647"/> + </end> + <end type="TARGET" refId="7" navigable="true"/> + <display labels="true" multiplicity="true"/> + </association> + <realization id="37"> + <bendpoint x="761" y="236"/> + <end type="SOURCE" refId="13"/> + <end type="TARGET" refId="10"/> + </realization> + <generalization id="38"> + <end type="SOURCE" refId="2"/> + <end type="TARGET" refId="10"/> + </generalization> + <realization id="39"> + <bendpoint x="1364" y="236"/> + <bendpoint x="1364" y="336"/> + <bendpoint x="1364" y="445"/> + <end type="SOURCE" refId="13"/> + <end type="TARGET" refId="17"/> + </realization> + <generalization id="40"> + <end type="SOURCE" refId="4"/> + <end type="TARGET" refId="5"/> + </generalization> + <realization id="41"> + <end type="SOURCE" refId="4"/> + <end type="TARGET" refId="7"/> + </realization> + <generalization id="42"> + <end type="SOURCE" refId="15"/> + <end type="TARGET" refId="16"/> + </generalization> + <association id="43"> + <end type="SOURCE" refId="13" navigable="false"> + <attribute id="44" name="routeDefinitions"/> + <multiplicity id="45" minimum="0" maximum="2147483647"/> + </end> + <end type="TARGET" refId="3" navigable="true"/> + <display labels="true" multiplicity="true"/> + </association> + <realization id="46"> + <end type="SOURCE" refId="1"/> + <end type="TARGET" refId="8"/> + </realization> + <generalization id="47"> + <end type="SOURCE" refId="10"/> + <end type="TARGET" refId="11"/> + </generalization> + <realization id="48"> + <bendpoint x="501" y="136"/> + <bendpoint x="501" y="236"/> + <bendpoint x="501" y="336"/> + <end type="SOURCE" refId="14"/> + <end type="TARGET" refId="15"/> + </realization> + <association id="49"> + <end type="SOURCE" refId="4" navigable="false"> + <attribute id="50" name="parent"/> + <multiplicity id="51" minimum="0" maximum="1"/> + </end> + <end type="TARGET" refId="4" navigable="true"/> + <display labels="true" multiplicity="true"/> + </association> + <realization id="52"> + <end type="SOURCE" refId="5"/> + <end type="TARGET" refId="6"/> + </realization> + <classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" + sort-features="false" accessors="true" visibility="true"> + <attributes public="false" package="false" protected="false" private="false" static="true"/> + <operations public="false" package="false" protected="false" private="false" static="true"/> + </classifier-display> + <association-display labels="true" multiplicity="true"/> +</class-diagram> \ No newline at end of file diff --git a/message-channel/src/main/java/com/iluwatar/message/channel/App.java b/message-channel/src/main/java/com/iluwatar/message/channel/App.java index 64201fdfb..b4d7b8576 100644 --- a/message-channel/src/main/java/com/iluwatar/message/channel/App.java +++ b/message-channel/src/main/java/com/iluwatar/message/channel/App.java @@ -1,7 +1,6 @@ package com.iluwatar.message.channel; import org.apache.camel.CamelContext; -import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; @@ -19,9 +18,7 @@ public class App { }); context.start(); - ProducerTemplate template = context.createProducerTemplate(); - template.sendBody("direct:greetings", "jou man"); - Thread.sleep(1000); + context.getRoutes().stream().forEach((r) -> System.out.println(r)); context.stop(); } }