Class NanoHttpServletRequestWrapper.NanoAsyncContext

  • All Implemented Interfaces:
    javax.servlet.AsyncContext
    Enclosing class:
    NanoHttpServletRequestWrapper

    public static class NanoHttpServletRequestWrapper.NanoAsyncContext
    extends java.lang.Object
    implements javax.servlet.AsyncContext
    • Field Detail

      • started

        protected boolean started
      • completed

        protected boolean completed
      • listeners

        protected java.util.List<javax.servlet.AsyncListener> listeners
      • request

        protected javax.servlet.ServletRequest request
      • response

        protected javax.servlet.ServletResponse response
      • timer

        protected java.util.Timer timer
      • timeout

        protected long timeout
    • Constructor Detail

      • NanoAsyncContext

        public NanoAsyncContext​(javax.servlet.ServletRequest request,
                                javax.servlet.ServletResponse response)
    • Method Detail

      • start

        public void start​(java.lang.Runnable run)
        Specified by:
        start in interface javax.servlet.AsyncContext
      • setTimeout

        public void setTimeout​(long timeout)
        Specified by:
        setTimeout in interface javax.servlet.AsyncContext
      • hasOriginalRequestAndResponse

        public boolean hasOriginalRequestAndResponse()
        Specified by:
        hasOriginalRequestAndResponse in interface javax.servlet.AsyncContext
      • getTimeout

        public long getTimeout()
        Specified by:
        getTimeout in interface javax.servlet.AsyncContext
      • getResponse

        public javax.servlet.ServletResponse getResponse()
        Specified by:
        getResponse in interface javax.servlet.AsyncContext
      • getRequest

        public javax.servlet.ServletRequest getRequest()
        Specified by:
        getRequest in interface javax.servlet.AsyncContext
      • dispatch

        public void dispatch​(javax.servlet.ServletContext context,
                             java.lang.String path)
        Specified by:
        dispatch in interface javax.servlet.AsyncContext
      • dispatch

        public void dispatch​(java.lang.String path)
        Specified by:
        dispatch in interface javax.servlet.AsyncContext
      • dispatch

        public void dispatch()
        Specified by:
        dispatch in interface javax.servlet.AsyncContext
      • createListener

        public <T extends javax.servlet.AsyncListener> T createListener​(java.lang.Class<T> clazz)
                                                                 throws javax.servlet.ServletException
        Specified by:
        createListener in interface javax.servlet.AsyncContext
        Throws:
        javax.servlet.ServletException
      • complete

        public void complete()
        Specified by:
        complete in interface javax.servlet.AsyncContext
      • addListener

        public void addListener​(javax.servlet.AsyncListener listener,
                                javax.servlet.ServletRequest servletRequest,
                                javax.servlet.ServletResponse servletResponse)
        Specified by:
        addListener in interface javax.servlet.AsyncContext
      • addListener

        public void addListener​(javax.servlet.AsyncListener listener)
        Specified by:
        addListener in interface javax.servlet.AsyncContext
      • isStarted

        public boolean isStarted()