Pil0tXia commented on code in PR #4272:
URL: https://github.com/apache/eventmesh/pull/4272#discussion_r1272473977


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/admin/handler/DeleteWebHookConfigHandler.java:
##########
@@ -33,29 +33,69 @@
 
 import lombok.extern.slf4j.Slf4j;
 
+/**
+ * This class handles the HTTP requests of {@code 
/webhook/deleteWebHookConfig} endpoint
+ * and deletes an existing WebHook configuration
+ * according to the given {@linkplain 
org.apache.eventmesh.webhook.api.WebHookConfig WebHookConfig}.
+ * <p>
+ * The implementation of
+ * {@linkplain 
org.apache.eventmesh.webhook.api.WebHookConfigOperation#deleteWebHookConfig 
WebHookConfigOperation}
+ * interface depends on the {@code eventMesh.webHook.operationMode} 
configuration in {@code eventmesh.properties}.
+ * <p>
+ * For example, when {@code eventMesh.webHook.operationMode=file}, It calls the
+ * {@linkplain 
org.apache.eventmesh.webhook.admin.FileWebHookConfigOperation#deleteWebHookConfig
 FileWebHookConfigOperation}
+ * method as implementation to delete the WebHook configuration file;
+ * <p>
+ * When {@code eventMesh.webHook.operationMode=nacos}, It calls the
+ * {@linkplain 
org.apache.eventmesh.webhook.admin.NacosWebHookConfigOperation#deleteWebHookConfig
 NacosWebHookConfigOperation}
+ * method as implementation to delete the WebHook configuration from Nacos.
+ * <p>
+ * The {@linkplain 
org.apache.eventmesh.webhook.receive.storage.HookConfigOperationManager#deleteWebHookConfig
 HookConfigOperationManager}
+ * which implements the {@linkplain 
org.apache.eventmesh.webhook.api.WebHookConfigOperation WebHookConfigOperation}
+ * interface, does not participate in the implementation of this endpoint.
+ *
+ * @see AbstractHttpHandler
+ */
+
 @SuppressWarnings("restriction")
 @Slf4j
 @EventHttpHandler(path = "/webhook/deleteWebHookConfig")
 public class DeleteWebHookConfigHandler extends AbstractHttpHandler {
 
     private final WebHookConfigOperation operation;
 
+    /**
+     * Constructs a new instance with the specified WebHook config operation 
and HTTP handler manager.
+     *
+     * @param operation the WebHookConfigOperation implementation used to 
delete the WebHook config
+     * @param httpHandlerManager Manages the registration of {@linkplain 
com.sun.net.httpserver.HttpHandler HttpHandler}
+     *                           for an {@link 
com.sun.net.httpserver.HttpServer HttpServer}.
+     */
     public DeleteWebHookConfigHandler(WebHookConfigOperation operation, 
HttpHandlerManager httpHandlerManager) {
         super(httpHandlerManager);
         this.operation = operation;
     }
 
-
+    /**
+     * Handles the HTTP requests by deleting a WebHook configuration.
+     * <p>
+     * This method is an implementation of {@linkplain 
com.sun.net.httpserver.HttpHandler#handle(HttpExchange)  HttpHandler.handle()}.

Review Comment:
   Resolved in 
https://github.com/apache/eventmesh/pull/4272/commits/18fa9ac7adc96c973eb95dd9d6fb9de535fdfaed
 (Concise the implement of handle())



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to