Package io.undertow.server.handlers
Class SetErrorHandler
- java.lang.Object
-
- io.undertow.server.handlers.SetErrorHandler
-
- All Implemented Interfaces:
HttpHandler
public class SetErrorHandler extends Object implements HttpHandler
A handler that sets response code but continues the exchange so the servlet's error page can be returned.- Author:
- Brad Wood
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSetErrorHandler.Builder
-
Constructor Summary
Constructors Constructor Description SetErrorHandler(HttpHandler next, int responseCode)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleRequest(HttpServerExchange exchange)Handle the request.StringtoString()
-
-
-
Constructor Detail
-
SetErrorHandler
public SetErrorHandler(HttpHandler next, int responseCode)
Construct a new instance.- Parameters:
responseCode- the response code to set
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin interfaceHttpHandler- Parameters:
exchange- the HTTP request/response exchange- Throws:
Exception
-
-