Class DisallowedMethodsHandler

  • All Implemented Interfaces:
    HttpHandler

    public class DisallowedMethodsHandler
    extends java.lang.Object
    implements HttpHandler
    Handler that blacklists certain HTTP methods.
    Author:
    Stuart Douglas
    • Constructor Detail

      • DisallowedMethodsHandler

        public DisallowedMethodsHandler​(HttpHandler next,
                                        java.util.Set<HttpString> disallowedMethods)
      • DisallowedMethodsHandler

        public DisallowedMethodsHandler​(HttpHandler next,
                                        HttpString... disallowedMethods)
    • Method Detail

      • handleRequest

        public void handleRequest​(HttpServerExchange exchange)
                           throws java.lang.Exception
        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