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/sockets/DataProductionEndpoint.java | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/sockets/DataProductionEndpoint.java b/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/sockets/DataProductionEndpoint.java
new file mode 100644
index 0000000..7281337
--- /dev/null
+++ b/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/sockets/DataProductionEndpoint.java
@@ -0,0 +1,41 @@
+package com.megatim.fdxconsultation.service.impl.sockets;
+
+import com.megatim.fdxconsultation.service.impl.sockets.encoders.DataProductionDecoder;
+import com.megatim.fdxconsultation.service.impl.sockets.encoders.DataProductionEncoder;
+import com.megatim.fdxconsultation.core.impl.sockets.DataProductionSessionHandler;
+import javax.inject.Inject;
+import javax.websocket.OnClose;
+import javax.websocket.OnError;
+import javax.websocket.OnOpen;
+import javax.websocket.Session;
+import javax.websocket.server.ServerEndpoint;
+
+/**
+ *
+ * @author lenovo
+ */
+@ServerEndpoint(value = "/data-production",
+ encoders = {DataProductionEncoder.class},
+ decoders = {DataProductionDecoder.class}
+)
+public class DataProductionEndpoint {
+
+ @Inject
+ private DataProductionSessionHandler dataProductionSessionHandler;
+
+ @OnOpen
+ public void onOpen(Session session) {
+ dataProductionSessionHandler.addSession(session);
+ }
+
+ @OnClose
+ public void onClose(Session session) {
+ dataProductionSessionHandler.removeSession(session);
+ }
+
+ @OnError
+ public void onError(Session session, Throwable throwable) {
+ dataProductionSessionHandler.removeSession(session);
+ }
+
+}
--
Gitblit v1.10.0