Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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