package com.hubilon.handler; import com.hubilon.util.HttpResponses; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import java.io.IOException; import java.util.Map; public final class PingHandler implements HttpHandler { private final int port; public PingHandler(int port) { this.port = port; } @Override public void handle(HttpExchange exchange) throws IOException { HttpResponses.sendJson(exchange, 200, Map.of("ok", true, "port", port)); } }