Class Dispatcher<T>

  • All Implemented Interfaces:
    javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest
    Direct Known Subclasses:
    DispatcherFuture, DispatcherSync

    public abstract class Dispatcher<T>
    extends javax.servlet.http.HttpServletRequestWrapper
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int httpStatus  
      • Fields inherited from interface javax.servlet.http.HttpServletRequest

        BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
    • Constructor Summary

      Constructors 
      Constructor Description
      Dispatcher​(javax.servlet.http.HttpServletRequest request)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract Dispatcher a​(String key, Object val)  
      abstract Dispatcher addAttribute​(String key, Object val)  
      abstract Dispatcher dispatch​(String jspPathAndParam)  
      static ThreadPoolExecutor getBgExecutor()  
      abstract T getResult()  
      abstract T getResult​(long timeout, TimeUnit unit)  
      static void init​(String resourcePath, int nWorkerThread)  
      abstract boolean isCancelled()  
      static boolean isDispatchFutureEnabled()  
      abstract boolean isDone()  
      boolean isSuccess()  
      static Dispatcher newBackgroundEvent​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static Dispatcher newEvent​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static void ResetNewThreadSize​(int nThread, long nSecsToWait)  
      abstract void setResult​(T rs)  
      static void ShutDownBackgroundTask​(long nSecsToWait)  
      • Methods inherited from class javax.servlet.http.HttpServletRequestWrapper

        getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
      • Methods inherited from class javax.servlet.ServletRequestWrapper

        getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
      • Methods inherited from interface javax.servlet.ServletRequest

        getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
    • Field Detail

      • httpStatus

        protected int httpStatus
    • Constructor Detail

      • Dispatcher

        public Dispatcher​(javax.servlet.http.HttpServletRequest request)
    • Method Detail

      • isSuccess

        public boolean isSuccess()
      • newEvent

        public static Dispatcher newEvent​(javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
      • newBackgroundEvent

        public static Dispatcher newBackgroundEvent​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
      • init

        public static void init​(String resourcePath,
                                int nWorkerThread)
      • isDispatchFutureEnabled

        public static boolean isDispatchFutureEnabled()
      • ResetNewThreadSize

        public static void ResetNewThreadSize​(int nThread,
                                              long nSecsToWait)
      • ShutDownBackgroundTask

        public static void ShutDownBackgroundTask​(long nSecsToWait)
      • setResult

        public abstract void setResult​(T rs)
      • getResult

        public abstract T getResult()
      • getResult

        public abstract T getResult​(long timeout,
                                    TimeUnit unit)
      • isDone

        public abstract boolean isDone()
      • isCancelled

        public abstract boolean isCancelled()