From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation
---
fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/camel/consumer/StandaloneServerStateConsumer.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/camel/consumer/StandaloneServerStateConsumer.java b/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/camel/consumer/StandaloneServerStateConsumer.java
new file mode 100644
index 0000000..28a6a83
--- /dev/null
+++ b/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/camel/consumer/StandaloneServerStateConsumer.java
@@ -0,0 +1,31 @@
+package com.megatim.fdxconsultation.service.impl.camel.consumer;
+
+import org.apache.camel.Handler;
+import com.fdx.messaging.common.StandaloneServerState;
+import com.megatim.fdxconsultation.core.ifaces.supervision.StandaloneServerStateEntityManager;
+import com.megatim.fdxconsultation.model.supervision.StandaloneServerStateEntity;
+import com.megatim.fdxconsultation.service.impl.sockets.helpers.StandaloneServerStateSessionHandler;
+import javax.inject.Inject;
+import javax.transaction.Transactional;
+
+/**
+ *
+ * @author ASUS
+ */
+public class StandaloneServerStateConsumer {
+
+ @Inject
+ StandaloneServerStateEntityManager serverStateManager;
+
+ @Inject
+ private StandaloneServerStateSessionHandler standaloneServerStateSessionHandler;
+
+ @Handler
+ @Transactional
+ public void consume(StandaloneServerState serverState) {
+ StandaloneServerStateEntity standaloneServerStateEntity = serverStateManager.persistStandaloneConfigurationStateEntity(serverState);
+ if(standaloneServerStateEntity != null) {
+ standaloneServerStateSessionHandler.publishMessage(standaloneServerStateEntity);
+ }
+ }
+}
--
Gitblit v1.10.0