Class WebHandler

java.lang.Object
de.craftsblock.craftsnet.api.http.WebHandler
All Implemented Interfaces:
HttpHandler

public class WebHandler extends Object implements HttpHandler
Handles HTTP requests and routes them to the appropriate handlers based on the registered routes.
Since:
3.0.1-SNAPSHOT
See Also:
  • Constructor Details

    • WebHandler

      public WebHandler(CraftsNet craftsNet)
      Constructs a new instance of the WebHandler
      Parameters:
      craftsNet - The CraftsNet instance which instantiates this web handler.
  • Method Details

    • handle

      public void handle(HttpExchange httpExchange) throws IOException
      Handles incoming HTTP requests and delegates them to the appropriate handlers.
      Specified by:
      handle in interface HttpHandler
      Parameters:
      httpExchange - The HTTP exchange object representing the incoming request and outgoing response.
      Throws:
      IOException - If an I/O error occurs during request processing.