From e499f84a2f4c049ba170cf028ad57d380152267e Mon Sep 17 00:00:00 2001
From: ulrich
Date: Tue, 23 Mar 2021 09:54:46 +0000
Subject: [PATCH] Code aufgeraeumt

---
 src/de/uhilger/avdirektor/handler/PingHandler.java |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/de/uhilger/avdirektor/handler/PingHandler.java b/src/de/uhilger/avdirektor/handler/PingHandler.java
index b94fad4..219391c 100644
--- a/src/de/uhilger/avdirektor/handler/PingHandler.java
+++ b/src/de/uhilger/avdirektor/handler/PingHandler.java
@@ -6,9 +6,6 @@
 package de.uhilger.avdirektor.handler;
 
 import com.sun.net.httpserver.HttpExchange;
-import com.sun.net.httpserver.HttpHandler;
-import java.io.IOException;
-import java.io.OutputStream;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -16,10 +13,15 @@
  *
  * @author ulrich
  */
-public class PingHandler implements HttpHandler {
+public class PingHandler extends CmdHandler {
   
   private static final Logger logger = Logger.getLogger(PingHandler.class.getName());
 
+  public PingHandler(String cmd) {
+    super(cmd);
+  }
+
+  /*
   @Override
   public void handle(HttpExchange t) throws IOException {
     logger.log(Level.FINE, "RequestURI: {0}", t.getRequestURI().toString());
@@ -30,5 +32,12 @@
     os.write(response.getBytes());
     os.close();    
   }
+  */
+  
+  protected String process(HttpExchange t, String params) {
+    String antwort = cmd;
+    logger.log(Level.FINE, antwort);
+    return antwort;
+  }  
   
 }

--
Gitblit v1.9.3