Package io.undertow.server.handlers
Class AllowedMethodsHandler
- java.lang.Object
-
- io.undertow.server.handlers.AllowedMethodsHandler
-
- All Implemented Interfaces:
HttpHandler
public class AllowedMethodsHandler extends java.lang.Object implements HttpHandler
Handler that whitelists certain HTTP methods. Only requests with a method in the allowed methods set will be allowed to continue.- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AllowedMethodsHandler.Builder
-
Constructor Summary
Constructors Constructor Description AllowedMethodsHandler(HttpHandler next, HttpString... allowedMethods)
AllowedMethodsHandler(HttpHandler next, java.util.Set<HttpString> allowedMethods)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<HttpString>
getAllowedMethods()
void
handleRequest(HttpServerExchange exchange)
Handle the request.
-
-
-
Constructor Detail
-
AllowedMethodsHandler
public AllowedMethodsHandler(HttpHandler next, java.util.Set<HttpString> allowedMethods)
-
AllowedMethodsHandler
public AllowedMethodsHandler(HttpHandler next, HttpString... allowedMethods)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws java.lang.Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
java.lang.Exception
-
getAllowedMethods
public java.util.Set<HttpString> getAllowedMethods()
-
-