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  
      static String resourcePath  
      static String splitter  
      static String suffix  
      • 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 addAttribute​(String key, Object val)  
      static Object DirectResult​(String resourcePath, Dispatcher $ev)  
      static Object DirectResult​(String resourcePath, Dispatcher $ev, Object... params)  
      static Object DirectResult​(String resourcePath, Dispatcher $ev, Map<String,​Object> params)  
      static Object DirectResult​(String resourcePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static Object DirectResult​(String resourcePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object... params)  
      static Object DirectResult​(String resourcePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,​Object> params)  
      abstract Dispatcher dispatch​(String jspPathAndParam)  
      abstract Object get​(String key)  
      static ThreadPoolExecutor getBgExecutor()  
      abstract T getResult()  
      abstract T getResult​(long timeout, TimeUnit unit)  
      static void init​(String $resourcePath, String $suffix, String $splitter, 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 Dispatcher set​(String key, Object val)  
      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

      • resourcePath

        public static String resourcePath
      • suffix

        public static String suffix
      • splitter

        public static String splitter
      • 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,
                                String $suffix,
                                String $splitter,
                                int nWorkerThread)
      • DirectResult

        public static Object DirectResult​(String resourcePath,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws Exception
        Throws:
        Exception
      • DirectResult

        public static Object DirectResult​(String resourcePath,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response,
                                          Map<String,​Object> params)
                                   throws Exception
        Throws:
        Exception
      • DirectResult

        public static Object DirectResult​(String resourcePath,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response,
                                          Object... params)
                                   throws Exception
        Throws:
        Exception
      • 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()