diff --git a/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/App.java b/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/App.java index f8fec8121..491ddaf0b 100644 --- a/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/App.java +++ b/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/App.java @@ -30,21 +30,20 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; /** - * Sometimes in enterprise systems there is a need to group incoming data in order to process it as a whole. For example - * you may need to gather offers and after defined number of offers has been received you would like to choose the one - * with the best parameters. - * - *

- * Aggregator allows you to merge messages based on defined criteria and parameters. It gathers original messages, - * applies aggregation strategy and upon fulfilling given criteria, releasing merged messages. - *

+ * Sometimes in enterprise systems there is a need to group incoming data in order to process it as + * a whole. For example you may need to gather offers and after defined number of offers has been + * received you would like to choose the one with the best parameters. * + *

Aggregator allows you to merge messages based on defined criteria and parameters. It gathers + * original messages, applies aggregation strategy and upon fulfilling given criteria, releasing + * merged messages. */ @SpringBootApplication public class App { /** - * Program entry point. It starts Spring Boot application and using Apache Camel it auto-configures routes. + * Program entry point. It starts Spring Boot application and using Apache Camel it + * auto-configures routes. * * @param args command line args */ diff --git a/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/AggregatorRoute.java b/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/AggregatorRoute.java index 652ddbb19..60499e1b8 100644 --- a/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/AggregatorRoute.java +++ b/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/AggregatorRoute.java @@ -30,16 +30,15 @@ import org.springframework.stereotype.Component; /** * Sample aggregator route definition. * - *

- * It consumes messages out of the direct:entry entry point and forwards them to direct:endpoint. - * Route accepts messages containing String as a body, it aggregates the messages based on the settings and forwards - * them as CSV to the output chanel. + *

It consumes messages out of the direct:entry entry point and forwards them to + * direct:endpoint. Route accepts messages containing String as a body, it aggregates the + * messages based on the settings and forwards them as CSV to the output chanel. * - * Settings for the aggregation are: aggregate until 3 messages are bundled or wait 2000ms before sending bundled - * messages further. - *

+ *

Settings for the aggregation are: aggregate until 3 messages are bundled or wait 2000ms + * before sending bundled messages further. * - * In this example input/output endpoints names are stored in application.properties file. + *

In this example input/output endpoints names are stored in application.properties + * file. */ @Component public class AggregatorRoute extends RouteBuilder { @@ -48,7 +47,8 @@ public class AggregatorRoute extends RouteBuilder { private MessageAggregationStrategy aggregator; /** - * Configures the route + * Configures the route. + * * @throws Exception in case of exception during configuration */ @Override diff --git a/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/MessageAggregationStrategy.java b/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/MessageAggregationStrategy.java index f8f2822a9..d38923ecc 100644 --- a/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/MessageAggregationStrategy.java +++ b/eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/MessageAggregationStrategy.java @@ -28,8 +28,8 @@ import org.apache.camel.processor.aggregate.AggregationStrategy; import org.springframework.stereotype.Component; /** - * Aggregation strategy joining bodies of messages. If message is first one oldMessage is null. All changes are - * made on IN messages. + * Aggregation strategy joining bodies of messages. If message is first one oldMessage is + * null. All changes are made on IN messages. */ @Component public class MessageAggregationStrategy implements AggregationStrategy { diff --git a/eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java b/eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java index bb9b26d10..78a23bdd3 100644 --- a/eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java +++ b/eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java @@ -30,12 +30,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * * When two applications communicate with each other using a messaging system they first need to * establish a communication channel that will carry the data. Message Channel decouples Message * producers and consumers. - *

- * The sending application doesn't necessarily know what particular application will end up + * + *

The sending application doesn't necessarily know what particular application will end up * retrieving it, but it can be assured that the application that retrieves the information is * interested in that information. This is because the messaging system has different Message * Channels for different types of information the applications want to communicate. When an @@ -44,19 +43,18 @@ import org.slf4j.LoggerFactory; * Likewise, an application that wants to receive particular information doesn't pull info off some * random channel; it selects what channel to get information from based on what type of information * it wants. - *

- * In this example we use Apache Camel to establish two different Message Channels. The first one - * reads from standard input and delivers messages to Direct endpoint. The second Message Channel is - * established from the Direct component to console output. No actual messages are sent, only the - * established routes are printed to standard output. - * + * + *

In this example we use Apache Camel to establish two different Message Channels. The first + * one reads from standard input and delivers messages to Direct endpoint. The second Message + * Channel is established from the Direct component to console output. No actual messages are sent, + * only the established routes are printed to standard output. */ public class App { private static final Logger LOGGER = LoggerFactory.getLogger(App.class); /** - * Program entry point + * Program entry point. */ public static void main(String[] args) throws Exception { CamelContext context = new DefaultCamelContext(); diff --git a/eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java b/eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java index e9081ebbb..c8a311374 100644 --- a/eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java +++ b/eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java @@ -31,30 +31,28 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * * There are well-established patterns for implementing broadcasting. The Observer pattern describes * the need to decouple observers from their subject (that is, the originator of the event) so that * the subject can easily provide event notification to all interested observers no matter how many * observers there are (even none). The Publish-Subscribe pattern expands upon Observer by adding * the notion of an event channel for communicating event notifications. - *

- * A Publish-Subscribe Channel works like this: It has one input channel that splits into multiple - * output channels, one for each subscriber. When an event is published into the channel, the - * Publish-Subscribe Channel delivers a copy of the message to each of the output channels. Each + * + *

A Publish-Subscribe Channel works like this: It has one input channel that splits into + * multiple output channels, one for each subscriber. When an event is published into the channel, + * the Publish-Subscribe Channel delivers a copy of the message to each of the output channels. Each * output end of the channel has only one subscriber, which is allowed to consume a message only * once. In this way, each subscriber gets the message only once, and consumed copies disappear from * their channels. - *

- * In this example we use Apache Camel to establish a Publish-Subscribe Channel from "direct-origin" - * to "mock:foo", "mock:bar" and "stream:out". - * + * + *

In this example we use Apache Camel to establish a Publish-Subscribe Channel from + * "direct-origin" to "mock:foo", "mock:bar" and "stream:out". */ public class App { private static final Logger LOGGER = LoggerFactory.getLogger(App.class); /** - * Program entry point + * Program entry point. */ public static void main(String[] args) throws Exception { CamelContext context = new DefaultCamelContext(); diff --git a/eip-splitter/src/main/java/com/iluwatar/eip/splitter/App.java b/eip-splitter/src/main/java/com/iluwatar/eip/splitter/App.java index e2df6f7e9..b0e338f27 100644 --- a/eip-splitter/src/main/java/com/iluwatar/eip/splitter/App.java +++ b/eip-splitter/src/main/java/com/iluwatar/eip/splitter/App.java @@ -30,23 +30,24 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; /** - * It is very common in integration systems that incoming messages consists of many items bundled together. For example - * an invoice document contains multiple invoice lines describing transaction (quantity, name of provided - * service/sold goods, price etc.). Such bundled messages may not be accepted by other systems. This is where splitter - * pattern comes in handy. It will take the whole document, split it based on given criteria and send individual - * items to the endpoint. + * It is very common in integration systems that incoming messages consists of many items bundled + * together. For example an invoice document contains multiple invoice lines describing transaction + * (quantity, name of provided service/sold goods, price etc.). Such bundled messages may not be + * accepted by other systems. This is where splitter pattern comes in handy. It will take the whole + * document, split it based on given criteria and send individual items to the endpoint. * *

- * Splitter allows you to split messages based on defined criteria. It takes original message, process it and send - * multiple parts to the output channel. It is not defined if it should keep the order of items though. + * Splitter allows you to split messages based on defined criteria. It takes original message, + * process it and send multiple parts to the output channel. It is not defined if it should keep the + * order of items though. *

- * */ @SpringBootApplication public class App { /** - * Program entry point. It starts Spring Boot application and using Apache Camel it auto-configures routes. + * Program entry point. It starts Spring Boot application and using Apache Camel it + * auto-configures routes. * * @param args command line args */ diff --git a/eip-splitter/src/main/java/com/iluwatar/eip/splitter/routes/SplitterRoute.java b/eip-splitter/src/main/java/com/iluwatar/eip/splitter/routes/SplitterRoute.java index 1efd8401c..4d2cb3efb 100644 --- a/eip-splitter/src/main/java/com/iluwatar/eip/splitter/routes/SplitterRoute.java +++ b/eip-splitter/src/main/java/com/iluwatar/eip/splitter/routes/SplitterRoute.java @@ -29,19 +29,19 @@ import org.springframework.stereotype.Component; /** * Sample splitter route definition. * - *

- * It consumes messages out of the direct:entry entry point and forwards them to direct:endpoint. - * Route accepts messages having body of array or collection of objects. Splitter component split message body and - * forwards single objects to the endpoint. - *

+ *

It consumes messages out of the direct:entry entry point and forwards them to + * direct:endpoint. Route accepts messages having body of array or collection of objects. + * Splitter component split message body and forwards single objects to the endpoint. * - * In this example input/output endpoints names are stored in application.properties file. + *

In this example input/output endpoints names are stored in application.properties + * file. */ @Component public class SplitterRoute extends RouteBuilder { /** - * Configures the route + * Configures the route. + * * @throws Exception in case of exception during configuration */ @Override diff --git a/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/App.java b/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/App.java index 5db2e8828..36407fbf7 100644 --- a/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/App.java +++ b/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/App.java @@ -30,21 +30,23 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; /** - * In most integration cases there is a need to monitor the messages flowing through the system. It is usually achieved - * by intercepting the message and redirecting it to a different location like console, filesystem or the database. - * It is important that such functionality should not modify the original message and influence the processing path. + * In most integration cases there is a need to monitor the messages flowing through the system. It + * is usually achieved by intercepting the message and redirecting it to a different location like + * console, filesystem or the database. It is important that such functionality should not modify + * the original message and influence the processing path. * *

- * Wire Tap allows you to route messages to a separate location while they are being forwarded to the ultimate - * destination. It basically consumes messages of the input channel and publishes the unmodified message to both - * output channels. + * Wire Tap allows you to route messages to a separate location while they are being forwarded to + * the ultimate destination. It basically consumes messages of the input channel and publishes the + * unmodified message to both output channels. *

*/ @SpringBootApplication public class App { /** - * Program entry point. It starts Spring Boot application and using Apache Camel it auto-configures routes. + * Program entry point. It starts Spring Boot application and using Apache Camel it + * auto-configures routes. * * @param args command line args */ diff --git a/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/routes/WireTapRoute.java b/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/routes/WireTapRoute.java index 4cb91e162..8eea7adbd 100644 --- a/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/routes/WireTapRoute.java +++ b/eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/routes/WireTapRoute.java @@ -29,19 +29,20 @@ import org.springframework.stereotype.Component; /** * Sample wire tap route definition. * - *

- * It consumes messages out of the direct:entry entry point and forwards them to direct:endpoint. - * Wire Tap intercepts the message and sends it to direct:wireTap, which in turn forwards it to + *

It consumes messages out of the direct:entry entry point and forwards them to + * direct:endpoint. Wire Tap intercepts the message and sends it to direct:wireTap, + * which in turn forwards it to * direct:wireTapEndpoint. - *

* - * In this example input/output endpoints names are stored in application.properties file. + *

In this example input/output endpoints names are stored in application.properties + * file. */ @Component public class WireTapRoute extends RouteBuilder { /** - * Configures the route + * Configures the route. + * * @throws Exception in case of exception during configuration */ @Override