Class DateHandler

  • All Implemented Interfaces:
    HttpHandler

    @Deprecated
    public class DateHandler
    extends java.lang.Object
    implements HttpHandler
    Deprecated.
    Class that adds the Date: header to a HTTP response. The current date string is cached, and is updated every second in a racey manner (i.e. it is possible for two thread to update it at once).

    This handler is deprecated, the same functionality is achieved by using the server option ALWAYS_SET_DATE. It is enabled by default.

    Author:
    Stuart Douglas
    • Constructor Detail

      • DateHandler

        public DateHandler​(HttpHandler next)
        Deprecated.
    • Method Detail

      • handleRequest

        public void handleRequest​(HttpServerExchange exchange)
                           throws java.lang.Exception
        Deprecated.
        Description copied from interface: HttpHandler
        Handle the request.
        Specified by:
        handleRequest in interface HttpHandler
        Parameters:
        exchange - the HTTP request/response exchange
        Throws:
        java.lang.Exception