Class HttpServiceErrorPageErrorHandler
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.handler.AbstractHandler
-
- org.eclipse.jetty.server.handler.ErrorHandler
-
- org.eclipse.jetty.servlet.ErrorPageErrorHandler
-
- org.eclipse.jetty.osgi.httpservice.HttpServiceErrorPageErrorHandler
-
- All Implemented Interfaces:
Handler,ErrorHandler.ErrorPageMapper,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
public class HttpServiceErrorPageErrorHandler extends ErrorPageErrorHandler
Extended error page handler. Makes it easy to plug a servlet to handle errors thrown by the HttpService or to use Jetty's ErrorPageErrorHandler API to plug custom error pages.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.ErrorHandler
ErrorHandler.ErrorPageMapper
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
AbstractHandler.ErrorDispatchHandler
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.servlet.ErrorPageErrorHandler
_servletContext, GLOBAL_ERROR_PAGE
-
Fields inherited from class org.eclipse.jetty.server.handler.ErrorHandler
ERROR_CHARSET, ERROR_CONTEXT, ERROR_PAGE
-
-
Constructor Summary
Constructors Constructor Description HttpServiceErrorPageErrorHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStop()Stops the managed lifecycle beans in the reverse order they were added.static HttpServiceErrorPageErrorHandlergetInstance()voidhandle(java.lang.String target, Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handle a request.-
Methods inherited from class org.eclipse.jetty.servlet.ErrorPageErrorHandler
addErrorPage, addErrorPage, addErrorPage, addErrorPage, doStart, getErrorPage, getErrorPages, setErrorPages
-
Methods inherited from class org.eclipse.jetty.server.handler.ErrorHandler
badMessageError, doError, errorPageForMethod, generateAcceptableResponse, generateAcceptableResponse, getAcceptableWriter, getCacheControl, getErrorHandler, getShowMessageInTitle, handleErrorPage, isShowServlet, isShowStacks, setCacheControl, setShowMessageInTitle, setShowServlet, setShowStacks, write, writeErrorPage, writeErrorPageBody, writeErrorPageHead, writeErrorPageMessage, writeErrorPageStacks
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
destroy, getServer, setServer
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
-
-
-
Method Detail
-
getInstance
public static HttpServiceErrorPageErrorHandler getInstance()
-
handle
public void handle(java.lang.String target, Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletExceptionDescription copied from interface:HandlerHandle a request.- Specified by:
handlein interfaceHandler- Overrides:
handlein classErrorHandler- Parameters:
target- The target of the request - either a URI or a name.baseRequest- The original unwrapped request object.request- The request either as theRequestobject or a wrapper of that request. Themethod can be used access the Request object if required.HttpConnection.getCurrentConnection().getHttpChannel().getRequest()response- The response as theResponseobject or a wrapper of that request. Themethod can be used access the Response object if required.HttpConnection.getCurrentConnection().getHttpChannel().getResponse()- Throws:
java.io.IOException- if unable to handle the request or response processingjavax.servlet.ServletException- if unable to handle the request or response due to underlying servlet issue
-
doStop
protected void doStop() throws java.lang.ExceptionDescription copied from class:ContainerLifeCycleStops the managed lifecycle beans in the reverse order they were added.- Overrides:
doStopin classAbstractHandler- Throws:
java.lang.Exception
-
-