Class DefaultRoute

java.lang.Object
de.craftsblock.craftsnet.api.http.builtin.DefaultRoute
All Implemented Interfaces:
Handler, RequestHandler

public class DefaultRoute extends Object implements RequestHandler
Represents a default route handler implementation. This class provides a default route for handling GET requests.
Since:
3.0.3-SNAPSHOT
  • Method Details

    • handleDefault

      @Route @RequestMethod(ALL) public void handleDefault(Exchange exchange) throws Exception
      Handles the default GET request.
      Parameters:
      exchange - The exchange object representing the HTTP request and response.
      Throws:
      IOException - If an I/O error occurs while handling the request.
      Exception
    • getInstance

      public static DefaultRoute getInstance()
      Returns the singleton instance of DefaultRoute.
      Returns:
      The single instance of DefaultRoute.
      Since:
      3.3.3-SNAPSHOT