This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit de55355b4a8e20b2e99156f357ab1d3ecedf4d4f
Author: Benoit Tellier <[email protected]>
AuthorDate: Fri Apr 17 08:11:31 2020 +0700

    JAMES-3117 Reactive Guice healthCHeck
---
 .../src/main/java/org/apache/james/GuiceLifecycleHealthCheck.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/server/container/guice/guice-common/src/main/java/org/apache/james/GuiceLifecycleHealthCheck.java
 
b/server/container/guice/guice-common/src/main/java/org/apache/james/GuiceLifecycleHealthCheck.java
index b7a6fe4..2dacb09 100644
--- 
a/server/container/guice/guice-common/src/main/java/org/apache/james/GuiceLifecycleHealthCheck.java
+++ 
b/server/container/guice/guice-common/src/main/java/org/apache/james/GuiceLifecycleHealthCheck.java
@@ -25,6 +25,8 @@ import org.apache.james.core.healthcheck.ComponentName;
 import org.apache.james.core.healthcheck.HealthCheck;
 import org.apache.james.core.healthcheck.Result;
 
+import reactor.core.publisher.Mono;
+
 public class GuiceLifecycleHealthCheck implements HealthCheck {
     private final IsStartedProbe probe;
 
@@ -39,11 +41,11 @@ public class GuiceLifecycleHealthCheck implements 
HealthCheck {
     }
 
     @Override
-    public Result check() {
+    public Mono<Result> checkReactive() {
         if (probe.isStarted()) {
-            return Result.healthy(componentName());
+            return Mono.just(Result.healthy(componentName()));
         } else {
-            return Result.unhealthy(componentName(), "James server is not 
started.");
+            return Mono.just(Result.unhealthy(componentName(), "James server 
is not started."));
         }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to