Skip to content

Commit 98505c6

Browse files
authored
fix: iluwatar#1297 Gateway pattern fixes (iluwatar#2818)
* add to parent pom.xml * update gateway readme
1 parent 961121c commit 98505c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gateway/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Gateway
33
category: Structural
44
language: en
55
tag:
6-
- Gang of Four
76
- Decoupling
87

98
---
@@ -38,7 +37,7 @@ The main class in our example is the `ExternalService` that contains items.
3837
class ExternalServiceA implements Gateway {
3938
@Override
4039
public void execute() throws Exception {
41-
System.out.println("Executing Service A");
40+
LOGGER.info("Executing Service A");
4241
// Simulate a time-consuming task
4342
Thread.sleep(1000);
4443
}
@@ -50,7 +49,7 @@ class ExternalServiceA implements Gateway {
5049
class ExternalServiceB implements Gateway {
5150
@Override
5251
public void execute() throws Exception {
53-
System.out.println("Executing Service B");
52+
LOGGER.info("Executing Service B");
5453
// Simulate a time-consuming task
5554
Thread.sleep(1000);
5655
}
@@ -62,7 +61,7 @@ class ExternalServiceB implements Gateway {
6261
class ExternalServiceC implements Gateway {
6362
@Override
6463
public void execute() throws Exception {
65-
System.out.println("Executing Service C");
64+
LOGGER.info("Executing Service C");
6665
// Simulate a time-consuming task
6766
Thread.sleep(1000);
6867
}
@@ -100,7 +99,7 @@ public class App {
10099
serviceB.execute();
101100
serviceC.execute();
102101
} catch (ThreadDeath e) {
103-
System.out.println("Interrupted!" + e);
102+
LOGGER.info("Interrupted!" + e);
104103
throw e;
105104
}
106105
}

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
<module>health-check</module>
213213
<module>notification</module>
214214
<module>single-table-inheritance</module>
215+
<module>gateway</module>
215216
</modules>
216217
<repositories>
217218
<repository>

0 commit comments

Comments
 (0)