Class XServletAsyncHandler

    • Constructor Detail

      • XServletAsyncHandler

        public XServletAsyncHandler​(@Nonnull
                                    com.helger.servlet.async.ServletAsyncSpec aAsyncSpec,
                                    @Nonnull
                                    IXServletHandler aNestedHandler)
    • Method Detail

      • setAsyncServletRunner

        public static void setAsyncServletRunner​(@Nonnull
                                                 com.helger.servlet.async.IAsyncServletRunner aAsyncServletRunner)
        Set the async runner to be used.
        Parameters:
        aAsyncServletRunner - The runner to be used. May not be null.
      • getAsyncServletRunner

        @Nonnull
        public static com.helger.servlet.async.IAsyncServletRunner getAsyncServletRunner()
        Returns:
        The global async runner. Never null.
      • onServletInit

        public void onServletInit​(@Nonnull
                                  com.helger.commons.collection.impl.ICommonsMap<String,​String> aInitParams)
                           throws javax.servlet.ServletException
        Description copied from interface: IXServletBasicHandler
        Called upon Servlet initialization
        Specified by:
        onServletInit in interface IXServletBasicHandler
        Parameters:
        aInitParams - The init parameters. Never null but maybe empty.
        Throws:
        javax.servlet.ServletException - if something goes wrong
      • onRequest

        public void onRequest​(@Nonnull
                              javax.servlet.http.HttpServletRequest aHttpRequest,
                              @Nonnull
                              javax.servlet.http.HttpServletResponse aHttpResponse,
                              @Nonnull
                              com.helger.http.EHttpVersion eHttpVersion,
                              @Nonnull
                              com.helger.commons.http.EHttpMethod eHttpMethod,
                              @Nonnull
                              com.helger.web.scope.IRequestWebScope aRequestScope)
                       throws javax.servlet.ServletException,
                              IOException
        Description copied from interface: IXServletHandler
        Handle the servlet action for a certain request and response.
        Specified by:
        onRequest in interface IXServletHandler
        Parameters:
        aHttpRequest - HTTP servlet request. Never null.
        aHttpResponse - HTTP servlet response. Never null.
        eHttpVersion - HTTP version. Never null.
        eHttpMethod - HTTP method. Never null.
        aRequestScope - Request scope. Never null.
        Throws:
        javax.servlet.ServletException - On business error
        IOException - On IO error