Class TinyHttpHandler

  • All Implemented Interfaces:
    HttpHandler
    Direct Known Subclasses:
    TinyHealthHttpHandler, TinyReadyHttpHandler

    public abstract class TinyHttpHandler
    extends Object
    implements HttpHandler
    Class simplifying the HttpHandler in a similar fashion to the jakarta HttpServlet class. Just implement the matching method to the HTTP method you need served.
    • Constructor Detail

      • TinyHttpHandler

        public TinyHttpHandler()
    • Method Detail

      • doGet

        protected void doGet​(HttpExchange exchange)
                      throws IOException
        Handle a GET request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.
      • doPost

        protected void doPost​(HttpExchange exchange)
                       throws IOException
        Handle a POST request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.
      • doHead

        protected void doHead​(HttpExchange exchange)
                       throws IOException
        Handle a HEAD request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.
      • doOptions

        protected void doOptions​(HttpExchange exchange)
                          throws IOException
        Handle an OPTIONS request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.
      • doTrace

        protected void doTrace​(HttpExchange exchange)
                        throws IOException
        Handle a TRACE request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.
      • doPut

        protected void doPut​(HttpExchange exchange)
                      throws IOException
        Handle a PUT request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.
      • doDelete

        protected void doDelete​(HttpExchange exchange)
                         throws IOException
        Handle a DELETE request.
        Parameters:
        exchange - The HTTP exchange.
        Throws:
        IOException - If failed to handle the request.