Interface ErrorPageGenerator
-
- All Known Implementing Classes:
DefaultErrorPageGenerator
public interface ErrorPageGeneratorError page generator interface, which is responsible for generating of an error page corresponding to the given response status. The ErrorPageGenerator is mainly used byResponse.sendError(int)andResponse.sendError(int, java.lang.String)methods. The ErrorPageGenerator might be set per 1)HttpServer:HttpServer.getServerConfiguration(); 2)NetworkListener:NetworkListener.setDefaultErrorPageGenerator(org.glassfish.grizzly.http.server.ErrorPageGenerator); 3)Response:Response.setErrorPageGenerator(org.glassfish.grizzly.http.server.ErrorPageGenerator);
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringgenerate(Request request, int status, java.lang.String reasonPhrase, java.lang.String description, java.lang.Throwable exception)Returns the HTML representation of the error page corresponding to the given HTTP response status.
-
-
-
Method Detail
-
generate
java.lang.String generate(Request request, int status, java.lang.String reasonPhrase, java.lang.String description, java.lang.Throwable exception)
Returns the HTML representation of the error page corresponding to the given HTTP response status.- Parameters:
request-Requeststatus- response statusreasonPhrase- response reason phrasedescription- extra description. Might be nullexception-Throwable, that caused the error. Might be null- Returns:
-
-