Class FileErrorPageHandler
- java.lang.Object
-
- io.undertow.server.handlers.error.FileErrorPageHandler
-
- All Implemented Interfaces:
HttpHandler
public class FileErrorPageHandler extends Object implements HttpHandler
Handler that serves up a file from disk to serve as an error page.This handler does not server up and response codes by default, you must configure the response codes it responds to.
- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileErrorPageHandler.Builder
-
Constructor Summary
Constructors Constructor Description FileErrorPageHandler(HttpHandler next, File file, Integer... responseCodes)
Deprecated.FileErrorPageHandler(HttpHandler next, Path file, MimeMappings mimeMappings, Integer... responseCodes)
FileErrorPageHandler(HttpHandler next, Path file, Integer... responseCodes)
FileErrorPageHandler(File file, Integer... responseCodes)
Deprecated.FileErrorPageHandler(Path file, Integer... responseCodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getFile()
HttpHandler
getNext()
Set<Integer>
getResponseCodes()
void
handleRequest(HttpServerExchange exchange)
Handle the request.FileErrorPageHandler
setFile(Path file)
FileErrorPageHandler
setNext(HttpHandler next)
FileErrorPageHandler
setResponseCodes(Integer... responseCodes)
FileErrorPageHandler
setResponseCodes(Set<Integer> responseCodes)
String
toString()
-
-
-
Constructor Detail
-
FileErrorPageHandler
@Deprecated public FileErrorPageHandler(File file, Integer... responseCodes)
Deprecated.
-
FileErrorPageHandler
@Deprecated public FileErrorPageHandler(HttpHandler next, File file, Integer... responseCodes)
Deprecated.
-
FileErrorPageHandler
public FileErrorPageHandler(HttpHandler next, Path file, Integer... responseCodes)
-
FileErrorPageHandler
public FileErrorPageHandler(HttpHandler next, Path file, MimeMappings mimeMappings, Integer... responseCodes)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getNext
public HttpHandler getNext()
-
setNext
public FileErrorPageHandler setNext(HttpHandler next)
-
setResponseCodes
public FileErrorPageHandler setResponseCodes(Set<Integer> responseCodes)
-
setResponseCodes
public FileErrorPageHandler setResponseCodes(Integer... responseCodes)
-
getFile
public Path getFile()
-
setFile
public FileErrorPageHandler setFile(Path file)
-
-