org.eclipse.jetty.osgi.httpservice
Class HttpServiceErrorPageErrorHandler

java.lang.Object
  extended by org.eclipse.jetty.util.component.AbstractLifeCycle
      extended by org.eclipse.jetty.util.component.AggregateLifeCycle
          extended by org.eclipse.jetty.server.handler.AbstractHandler
              extended by org.eclipse.jetty.server.handler.ErrorHandler
                  extended by org.eclipse.jetty.servlet.ErrorPageErrorHandler
                      extended by org.eclipse.jetty.osgi.httpservice.HttpServiceErrorPageErrorHandler
All Implemented Interfaces:
Handler, Destroyable, Dumpable, 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.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
 
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, ERROR_PAGE
 
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
Constructor Summary
HttpServiceErrorPageErrorHandler()
           
 
Method Summary
protected  void doStop()
          Stop the joined lifecycle beans in the reverse order they were added.
static HttpServiceErrorPageErrorHandler getInstance()
           
 void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
          Handle a request.
 
Methods inherited from class org.eclipse.jetty.servlet.ErrorPageErrorHandler
addErrorPage, addErrorPage, addErrorPage, addErrorPage, doStart, getErrorPages, setErrorPages
 
Methods inherited from class org.eclipse.jetty.server.handler.ErrorHandler
getCacheControl, handleErrorPage, isShowStacks, setCacheControl, setShowStacks, write, writeErrorPage, writeErrorPageBody, writeErrorPageHead, writeErrorPageMessage, writeErrorPageStacks
 
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
destroy, dumpThis, getServer, setServer
 
Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle
addBean, addBean, contains, dump, dump, dump, dump, dump, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage
 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, 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.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 

Constructor Detail

HttpServiceErrorPageErrorHandler

public HttpServiceErrorPageErrorHandler()
Method Detail

getInstance

public static HttpServiceErrorPageErrorHandler getInstance()

handle

public void handle(String target,
                   Request baseRequest,
                   HttpServletRequest request,
                   HttpServletResponse response)
            throws IOException
Description copied from interface: Handler
Handle a request.

Specified by:
handle in interface Handler
Overrides:
handle in class ErrorPageErrorHandler
Parameters:
target - The target of the request - either a URI or a name.
baseRequest - The original unwrapped request object.
request - The request either as the Request object or a wrapper of that request. The AbstractHttpConnection.getCurrentConnection() method can be used access the Request object if required.
response - The response as the Response object or a wrapper of that request. The AbstractHttpConnection.getCurrentConnection() method can be used access the Response object if required.
Throws:
IOException
See Also:
ErrorHandler.handle(String, Request, HttpServletRequest, HttpServletResponse)

doStop

protected void doStop()
               throws Exception
Description copied from class: AggregateLifeCycle
Stop the joined lifecycle beans in the reverse order they were added.

Overrides:
doStop in class ErrorPageErrorHandler
Throws:
Exception
See Also:
AbstractLifeCycle.doStart()


Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.