Skip to content

Commit

Permalink
fix: #1297 Gateway pattern fixes (#2818)
Browse files Browse the repository at this point in the history
* add to parent pom.xml

* update gateway readme
  • Loading branch information
iluwatar authored Mar 10, 2024
1 parent 961121c commit 98505c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Gateway
category: Structural
language: en
tag:
- Gang of Four
- Decoupling

---
Expand Down Expand Up @@ -38,7 +37,7 @@ The main class in our example is the `ExternalService` that contains items.
class ExternalServiceA implements Gateway {
@Override
public void execute() throws Exception {
System.out.println("Executing Service A");
LOGGER.info("Executing Service A");
// Simulate a time-consuming task
Thread.sleep(1000);
}
Expand All @@ -50,7 +49,7 @@ class ExternalServiceA implements Gateway {
class ExternalServiceB implements Gateway {
@Override
public void execute() throws Exception {
System.out.println("Executing Service B");
LOGGER.info("Executing Service B");
// Simulate a time-consuming task
Thread.sleep(1000);
}
Expand All @@ -62,7 +61,7 @@ class ExternalServiceB implements Gateway {
class ExternalServiceC implements Gateway {
@Override
public void execute() throws Exception {
System.out.println("Executing Service C");
LOGGER.info("Executing Service C");
// Simulate a time-consuming task
Thread.sleep(1000);
}
Expand Down Expand Up @@ -100,7 +99,7 @@ public class App {
serviceB.execute();
serviceC.execute();
} catch (ThreadDeath e) {
System.out.println("Interrupted!" + e);
LOGGER.info("Interrupted!" + e);
throw e;
}
}
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
<module>health-check</module>
<module>notification</module>
<module>single-table-inheritance</module>
<module>gateway</module>
</modules>
<repositories>
<repository>
Expand Down

0 comments on commit 98505c6

Please sign in to comment.