public final class ErrorPageRegistry extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorPageRegistry.ErrorRegistration |
| Constructor and Description |
|---|
ErrorPageRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addServlet(@NotNull ServletHandler handler)
Add the servlet for error handling
|
void |
cleanup() |
ServletHandler |
get(Throwable exception,
int errorCode)
Get the servlet handling the error (error code or exception).
|
static @Nullable ErrorPageRegistry.ErrorRegistration |
getErrorRegistration(@NotNull ServletInfo info)
Parse the registration properties of the servlet for error handling
|
void |
getRuntimeInfo(org.osgi.service.http.runtime.dto.ServletContextDTO dto,
Collection<org.osgi.service.http.runtime.dto.FailedErrorPageDTO> failedErrorPageDTOs)
Get DTOs for error pages.
|
void |
removeServlet(@NotNull ServletInfo info,
boolean destroy)
Remove the servlet from error handling
|
@Nullable public static @Nullable ErrorPageRegistry.ErrorRegistration getErrorRegistration(@NotNull @NotNull ServletInfo info)
info - The servlet infopublic void addServlet(@NotNull
@NotNull ServletHandler handler)
handler - The servlet handler.public void removeServlet(@NotNull
@NotNull ServletInfo info,
boolean destroy)
info - The servlet info.public void cleanup()
public ServletHandler get(Throwable exception, int errorCode)
exception - Optional exceptionerrorCode - Error codenullpublic void getRuntimeInfo(org.osgi.service.http.runtime.dto.ServletContextDTO dto,
Collection<org.osgi.service.http.runtime.dto.FailedErrorPageDTO> failedErrorPageDTOs)
dto - The servlet context DTOfailedErrorPageDTOs - The failed error page DTOsCopyright © 2006–2020 The Apache Software Foundation. All rights reserved.