Class BufferedResponseHandler

  • All Implemented Interfaces:
    Handler, HandlerContainer, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle

    public class BufferedResponseHandler
    extends HandlerWrapper
    Buffered Response Handler

    A Handler that can apply a HttpOutput.Interceptor mechanism to buffer the entire response content until the output is closed. This allows the commit to be delayed until the response is complete and thus headers and response status can be changed while writing the body.

    Note that the decision to buffer is influenced by the headers and status at the first write, and thus subsequent changes to those headers will not influence the decision to buffer or not.

    Note also that there are no memory limits to the size of the buffer, thus this handler can represent an unbounded memory commitment if the content generated can also be unbounded.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

        org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

        org.eclipse.jetty.util.component.LifeCycle.Listener
    • Field Summary

      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
      • Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

        KEY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.jetty.util.IncludeExclude<java.lang.String> getMethodIncludeExclude()  
      org.eclipse.jetty.util.IncludeExclude<java.lang.String> getMimeIncludeExclude()  
      org.eclipse.jetty.util.IncludeExclude<java.lang.String> getPathIncludeExclude()  
      void handle​(java.lang.String target, Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Handle a request.
      protected boolean isMimeTypeBufferable​(java.lang.String mimetype)  
      protected boolean isPathBufferable​(java.lang.String requestURI)  
      • 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

        dumpSelf
      • Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle

        addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
    • Constructor Detail

      • BufferedResponseHandler

        public BufferedResponseHandler()
    • Method Detail

      • getMethodIncludeExclude

        public org.eclipse.jetty.util.IncludeExclude<java.lang.String> getMethodIncludeExclude()
      • getPathIncludeExclude

        public org.eclipse.jetty.util.IncludeExclude<java.lang.String> getPathIncludeExclude()
      • getMimeIncludeExclude

        public org.eclipse.jetty.util.IncludeExclude<java.lang.String> getMimeIncludeExclude()
      • isMimeTypeBufferable

        protected boolean isMimeTypeBufferable​(java.lang.String mimetype)
      • isPathBufferable

        protected boolean isPathBufferable​(java.lang.String requestURI)