Package com.github.taymindis.jh
Class DispatcherFuture<T>
- java.lang.Object
-
- javax.servlet.ServletRequestWrapper
-
- javax.servlet.http.HttpServletRequestWrapper
-
- com.github.taymindis.jh.Dispatcher
-
- com.github.taymindis.jh.DispatcherFuture<T>
-
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest,javax.servlet.ServletRequest
public class DispatcherFuture<T> extends Dispatcher
dispatching async between web container
-
-
Field Summary
-
Fields inherited from class com.github.taymindis.jh.Dispatcher
httpStatus, resourcePath, splitter, suffix
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDispatcherFuture(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DispatcherFutureaddAttribute(String key, Object val)DispatcherFuturedispatch(String jspPath)dispatching first between the file via web container, get the result at the end of requestObjectget(String key)TgetResult()TgetResult(long timeout, TimeUnit unit)booleanisCancelled()booleanisDone()DispatcherFutureset(String key, Object val)voidsetResult(Object rs)-
Methods inherited from class com.github.taymindis.jh.Dispatcher
DirectResult, DirectResult, DirectResult, DirectResult, DirectResult, DirectResult, getBgExecutor, init, isDispatchFutureEnabled, isSuccess, newBackgroundEvent, newEvent, ResetNewThreadSize, ShutDownBackgroundTask
-
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
-
-
-
Method Detail
-
addAttribute
public DispatcherFuture addAttribute(String key, Object val)
- Specified by:
addAttributein classDispatcher
-
set
public DispatcherFuture set(String key, Object val)
- Specified by:
setin classDispatcher
-
get
public Object get(String key)
- Specified by:
getin classDispatcher
-
dispatch
public DispatcherFuture dispatch(String jspPath) throws Exception
dispatching first between the file via web container, get the result at the end of request- Specified by:
dispatchin classDispatcher- Parameters:
jspPath- resource path- Returns:
- DispatchFuture
- Throws:
IOException- IOExceptionjavax.servlet.ServletException- ServletExceptionException
-
isDone
public boolean isDone()
- Specified by:
isDonein classDispatcher
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin classDispatcher
-
setResult
public void setResult(Object rs)
- Specified by:
setResultin classDispatcher
-
getResult
public T getResult()
- Specified by:
getResultin classDispatcher
-
getResult
public T getResult(long timeout, TimeUnit unit)
- Specified by:
getResultin classDispatcher
-
-