Package io.undertow.server.handlers
Class SetErrorHandler
- java.lang.Object
-
- io.undertow.server.handlers.SetErrorHandler
-
- All Implemented Interfaces:
HttpHandler
public class SetErrorHandler extends java.lang.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 class
SetErrorHandler.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 void
handleRequest(HttpServerExchange exchange)
Handle the request.java.lang.String
toString()
-
-
-
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 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-