Skip to content

Commit 7c888e8

Browse files
anuragagarwal561994iluwatar
authored andcommitted
Resolves checkstyle errors for eip-* (iluwatar#1069)
* Reduces checkstyle errors in eip-aggregator * Reduces checkstyle errors in eip-message-channel * Reduces checkstyle errors in eip-publish-subscribe * Reduces checkstyle errors in eip-splitter * Reduces checkstyle errors in eip-wire-tap
1 parent f2c91eb commit 7c888e8

File tree

9 files changed

+68
-69
lines changed

9 files changed

+68
-69
lines changed

eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/App.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,20 @@
3030
import org.springframework.context.ConfigurableApplicationContext;
3131

3232
/**
33-
* Sometimes in enterprise systems there is a need to group incoming data in order to process it as a whole. For example
34-
* you may need to gather offers and after defined number of offers has been received you would like to choose the one
35-
* with the best parameters.
36-
*
37-
* <p>
38-
* Aggregator allows you to merge messages based on defined criteria and parameters. It gathers original messages,
39-
* applies aggregation strategy and upon fulfilling given criteria, releasing merged messages.
40-
* </p>
33+
* Sometimes in enterprise systems there is a need to group incoming data in order to process it as
34+
* a whole. For example you may need to gather offers and after defined number of offers has been
35+
* received you would like to choose the one with the best parameters.
4136
*
37+
* <p>Aggregator allows you to merge messages based on defined criteria and parameters. It gathers
38+
* original messages, applies aggregation strategy and upon fulfilling given criteria, releasing
39+
* merged messages.
4240
*/
4341
@SpringBootApplication
4442
public class App {
4543

4644
/**
47-
* Program entry point. It starts Spring Boot application and using Apache Camel it auto-configures routes.
45+
* Program entry point. It starts Spring Boot application and using Apache Camel it
46+
* auto-configures routes.
4847
*
4948
* @param args command line args
5049
*/

eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/AggregatorRoute.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@
3030
/**
3131
* Sample aggregator route definition.
3232
*
33-
* <p>
34-
* It consumes messages out of the <i>direct:entry</i> entry point and forwards them to <i>direct:endpoint</i>.
35-
* Route accepts messages containing String as a body, it aggregates the messages based on the settings and forwards
36-
* them as CSV to the output chanel.
33+
* <p>It consumes messages out of the <i>direct:entry</i> entry point and forwards them to
34+
* <i>direct:endpoint</i>. Route accepts messages containing String as a body, it aggregates the
35+
* messages based on the settings and forwards them as CSV to the output chanel.
3736
*
38-
* Settings for the aggregation are: aggregate until 3 messages are bundled or wait 2000ms before sending bundled
39-
* messages further.
40-
* </p>
37+
* <p>Settings for the aggregation are: aggregate until 3 messages are bundled or wait 2000ms
38+
* before sending bundled messages further.
4139
*
42-
* In this example input/output endpoints names are stored in <i>application.properties</i> file.
40+
* <p>In this example input/output endpoints names are stored in <i>application.properties</i>
41+
* file.
4342
*/
4443
@Component
4544
public class AggregatorRoute extends RouteBuilder {
@@ -48,7 +47,8 @@ public class AggregatorRoute extends RouteBuilder {
4847
private MessageAggregationStrategy aggregator;
4948

5049
/**
51-
* Configures the route
50+
* Configures the route.
51+
*
5252
* @throws Exception in case of exception during configuration
5353
*/
5454
@Override

eip-aggregator/src/main/java/com/iluwatar/eip/aggregator/routes/MessageAggregationStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import org.springframework.stereotype.Component;
2929

3030
/**
31-
* Aggregation strategy joining bodies of messages. If message is first one <i>oldMessage</i> is null. All changes are
32-
* made on IN messages.
31+
* Aggregation strategy joining bodies of messages. If message is first one <i>oldMessage</i> is
32+
* null. All changes are made on IN messages.
3333
*/
3434
@Component
3535
public class MessageAggregationStrategy implements AggregationStrategy {

eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@
3030
import org.slf4j.LoggerFactory;
3131

3232
/**
33-
*
3433
* When two applications communicate with each other using a messaging system they first need to
3534
* establish a communication channel that will carry the data. Message Channel decouples Message
3635
* producers and consumers.
37-
* <p>
38-
* The sending application doesn't necessarily know what particular application will end up
36+
*
37+
* <p>The sending application doesn't necessarily know what particular application will end up
3938
* retrieving it, but it can be assured that the application that retrieves the information is
4039
* interested in that information. This is because the messaging system has different Message
4140
* Channels for different types of information the applications want to communicate. When an
@@ -44,19 +43,18 @@
4443
* Likewise, an application that wants to receive particular information doesn't pull info off some
4544
* random channel; it selects what channel to get information from based on what type of information
4645
* it wants.
47-
* <p>
48-
* In this example we use Apache Camel to establish two different Message Channels. The first one
49-
* reads from standard input and delivers messages to Direct endpoint. The second Message Channel is
50-
* established from the Direct component to console output. No actual messages are sent, only the
51-
* established routes are printed to standard output.
52-
*
46+
*
47+
* <p>In this example we use Apache Camel to establish two different Message Channels. The first
48+
* one reads from standard input and delivers messages to Direct endpoint. The second Message
49+
* Channel is established from the Direct component to console output. No actual messages are sent,
50+
* only the established routes are printed to standard output.
5351
*/
5452
public class App {
5553

5654
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
5755

5856
/**
59-
* Program entry point
57+
* Program entry point.
6058
*/
6159
public static void main(String[] args) throws Exception {
6260
CamelContext context = new DefaultCamelContext();

eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,28 @@
3131
import org.slf4j.LoggerFactory;
3232

3333
/**
34-
*
3534
* There are well-established patterns for implementing broadcasting. The Observer pattern describes
3635
* the need to decouple observers from their subject (that is, the originator of the event) so that
3736
* the subject can easily provide event notification to all interested observers no matter how many
3837
* observers there are (even none). The Publish-Subscribe pattern expands upon Observer by adding
3938
* the notion of an event channel for communicating event notifications.
40-
* <p>
41-
* A Publish-Subscribe Channel works like this: It has one input channel that splits into multiple
42-
* output channels, one for each subscriber. When an event is published into the channel, the
43-
* Publish-Subscribe Channel delivers a copy of the message to each of the output channels. Each
39+
*
40+
* <p>A Publish-Subscribe Channel works like this: It has one input channel that splits into
41+
* multiple output channels, one for each subscriber. When an event is published into the channel,
42+
* the Publish-Subscribe Channel delivers a copy of the message to each of the output channels. Each
4443
* output end of the channel has only one subscriber, which is allowed to consume a message only
4544
* once. In this way, each subscriber gets the message only once, and consumed copies disappear from
4645
* their channels.
47-
* <p>
48-
* In this example we use Apache Camel to establish a Publish-Subscribe Channel from "direct-origin"
49-
* to "mock:foo", "mock:bar" and "stream:out".
50-
*
46+
*
47+
* <p>In this example we use Apache Camel to establish a Publish-Subscribe Channel from
48+
* "direct-origin" to "mock:foo", "mock:bar" and "stream:out".
5149
*/
5250
public class App {
5351

5452
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
5553

5654
/**
57-
* Program entry point
55+
* Program entry point.
5856
*/
5957
public static void main(String[] args) throws Exception {
6058
CamelContext context = new DefaultCamelContext();

eip-splitter/src/main/java/com/iluwatar/eip/splitter/App.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,24 @@
3030
import org.springframework.context.ConfigurableApplicationContext;
3131

3232
/**
33-
* It is very common in integration systems that incoming messages consists of many items bundled together. For example
34-
* an invoice document contains multiple invoice lines describing transaction (quantity, name of provided
35-
* service/sold goods, price etc.). Such bundled messages may not be accepted by other systems. This is where splitter
36-
* pattern comes in handy. It will take the whole document, split it based on given criteria and send individual
37-
* items to the endpoint.
33+
* It is very common in integration systems that incoming messages consists of many items bundled
34+
* together. For example an invoice document contains multiple invoice lines describing transaction
35+
* (quantity, name of provided service/sold goods, price etc.). Such bundled messages may not be
36+
* accepted by other systems. This is where splitter pattern comes in handy. It will take the whole
37+
* document, split it based on given criteria and send individual items to the endpoint.
3838
*
3939
* <p>
40-
* Splitter allows you to split messages based on defined criteria. It takes original message, process it and send
41-
* multiple parts to the output channel. It is not defined if it should keep the order of items though.
40+
* Splitter allows you to split messages based on defined criteria. It takes original message,
41+
* process it and send multiple parts to the output channel. It is not defined if it should keep the
42+
* order of items though.
4243
* </p>
43-
*
4444
*/
4545
@SpringBootApplication
4646
public class App {
4747

4848
/**
49-
* Program entry point. It starts Spring Boot application and using Apache Camel it auto-configures routes.
49+
* Program entry point. It starts Spring Boot application and using Apache Camel it
50+
* auto-configures routes.
5051
*
5152
* @param args command line args
5253
*/

eip-splitter/src/main/java/com/iluwatar/eip/splitter/routes/SplitterRoute.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@
2929
/**
3030
* Sample splitter route definition.
3131
*
32-
* <p>
33-
* It consumes messages out of the <i>direct:entry</i> entry point and forwards them to <i>direct:endpoint</i>.
34-
* Route accepts messages having body of array or collection of objects. Splitter component split message body and
35-
* forwards single objects to the endpoint.
36-
* </p>
32+
* <p>It consumes messages out of the <i>direct:entry</i> entry point and forwards them to
33+
* <i>direct:endpoint</i>. Route accepts messages having body of array or collection of objects.
34+
* Splitter component split message body and forwards single objects to the endpoint.
3735
*
38-
* In this example input/output endpoints names are stored in <i>application.properties</i> file.
36+
* <p>In this example input/output endpoints names are stored in <i>application.properties</i>
37+
* file.
3938
*/
4039
@Component
4140
public class SplitterRoute extends RouteBuilder {
4241

4342
/**
44-
* Configures the route
43+
* Configures the route.
44+
*
4545
* @throws Exception in case of exception during configuration
4646
*/
4747
@Override

eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/App.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,23 @@
3030
import org.springframework.context.ConfigurableApplicationContext;
3131

3232
/**
33-
* In most integration cases there is a need to monitor the messages flowing through the system. It is usually achieved
34-
* by intercepting the message and redirecting it to a different location like console, filesystem or the database.
35-
* It is important that such functionality should not modify the original message and influence the processing path.
33+
* In most integration cases there is a need to monitor the messages flowing through the system. It
34+
* is usually achieved by intercepting the message and redirecting it to a different location like
35+
* console, filesystem or the database. It is important that such functionality should not modify
36+
* the original message and influence the processing path.
3637
*
3738
* <p>
38-
* Wire Tap allows you to route messages to a separate location while they are being forwarded to the ultimate
39-
* destination. It basically consumes messages of the input channel and publishes the unmodified message to both
40-
* output channels.
39+
* Wire Tap allows you to route messages to a separate location while they are being forwarded to
40+
* the ultimate destination. It basically consumes messages of the input channel and publishes the
41+
* unmodified message to both output channels.
4142
* </p>
4243
*/
4344
@SpringBootApplication
4445
public class App {
4546

4647
/**
47-
* Program entry point. It starts Spring Boot application and using Apache Camel it auto-configures routes.
48+
* Program entry point. It starts Spring Boot application and using Apache Camel it
49+
* auto-configures routes.
4850
*
4951
* @param args command line args
5052
*/

eip-wire-tap/src/main/java/com/iluwatar/eip/wiretap/routes/WireTapRoute.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,20 @@
2929
/**
3030
* Sample wire tap route definition.
3131
*
32-
* <p>
33-
* It consumes messages out of the <i>direct:entry</i> entry point and forwards them to <i>direct:endpoint</i>.
34-
* Wire Tap intercepts the message and sends it to <i>direct:wireTap</i>, which in turn forwards it to
32+
* <p>It consumes messages out of the <i>direct:entry</i> entry point and forwards them to
33+
* <i>direct:endpoint</i>. Wire Tap intercepts the message and sends it to <i>direct:wireTap</i>,
34+
* which in turn forwards it to
3535
* <i>direct:wireTapEndpoint</i>.
36-
* </p>
3736
*
38-
* In this example input/output endpoints names are stored in <i>application.properties</i> file.
37+
* <p>In this example input/output endpoints names are stored in <i>application.properties</i>
38+
* file.
3939
*/
4040
@Component
4141
public class WireTapRoute extends RouteBuilder {
4242

4343
/**
44-
* Configures the route
44+
* Configures the route.
45+
*
4546
* @throws Exception in case of exception during configuration
4647
*/
4748
@Override

0 commit comments

Comments
 (0)