Skip to content

Commit

Permalink
Updated to use GF 2.0 (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: GitLab <naveena.dhougoda-hamal@diffusiondata.com>
  • Loading branch information
naveenad and GitLab committed May 20, 2024
1 parent 544cb59 commit 1e790cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,19 @@ public HumanStreamingSourceHandler(
this.gui = new HumanGui(
greeting,
this.stateHandler::getState,
ev -> this.stateHandler.reportStatus(ev.getStatus(), ev.getTitle(), ev.getDescription())
ev -> {
try {
return
this
.stateHandler
.reportStatus(ev.getStatus(), ev.getTitle(), ev.getDescription())
.get(5000, TimeUnit.MILLISECONDS);
}
catch (InterruptedException | ExecutionException |
TimeoutException ex) {
throw new IllegalStateException(ex);
}
}
);
this.gui.addSendEventHandler((ev) -> {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public void initialize(
}

@Override
public GatewayMeterRegistry getGatewayMeterRegistry() {
public GatewayMeterRegistry initializeGatewayMeterRegistry(
Map<String, Object> globalParams) {
return () -> meterRegistry;
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.diffusiondata.gateway</groupId>
<artifactId>gateway-framework</artifactId>
<version>2.0.0_RC1</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public class Application implements GatewayApplication {
new JmxMeterRegistry(s -> null, Clock.SYSTEM);

@Override
public GatewayMeterRegistry getGatewayMeterRegistry() {
public GatewayMeterRegistry initializeGatewayMeterRegistry(
Map<String, Object> globalParams) {
return () -> meterRegistry;
}

Expand Down

0 comments on commit 1e790cf

Please sign in to comment.