Package com.helger.photon.ajax.servlet
Class AjaxXServletHandler
- java.lang.Object
-
- com.helger.photon.ajax.servlet.AjaxXServletHandler
-
- All Implemented Interfaces:
com.helger.xservlet.handler.IXServletBasicHandler,com.helger.xservlet.handler.simple.IXServletSimpleHandler
@ThreadSafe public class AjaxXServletHandler extends Object implements com.helger.xservlet.handler.simple.IXServletSimpleHandler
Abstract implementation of a servlet that invokes AJAX functions.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static StringREQUEST_PARAM_JQUERY_NO_CACHEThe name of the request parameter used by jQuery to indicate "no cache".
-
Constructor Summary
Constructors Constructor Description AjaxXServletHandler()AjaxXServletHandler(Supplier<? extends IAjaxRegistry> aRegistryFactory, Supplier<? extends IAjaxInvoker> aInvokerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.helger.photon.app.PhotonUnifiedResponsecreateUnifiedResponse(com.helger.http.EHttpVersion eHttpVersion, com.helger.commons.http.EHttpMethod eHttpMethod, jakarta.servlet.http.HttpServletRequest aHttpRequest, com.helger.web.scope.IRequestWebScope aRequestScope)voidhandleRequest(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.servlet.response.UnifiedResponse aUnifiedResponse)com.helger.commons.state.EContinueinitRequestState(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.servlet.response.UnifiedResponse aUnifiedResponse)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
REQUEST_PARAM_JQUERY_NO_CACHE
public static final String REQUEST_PARAM_JQUERY_NO_CACHE
The name of the request parameter used by jQuery to indicate "no cache". Use this constant for parameter filtering.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AjaxXServletHandler
public AjaxXServletHandler()
-
AjaxXServletHandler
public AjaxXServletHandler(@Nonnull Supplier<? extends IAjaxRegistry> aRegistryFactory, @Nonnull Supplier<? extends IAjaxInvoker> aInvokerFactory)
-
-
Method Detail
-
createUnifiedResponse
@Nonnull public com.helger.photon.app.PhotonUnifiedResponse createUnifiedResponse(@Nonnull com.helger.http.EHttpVersion eHttpVersion, @Nonnull com.helger.commons.http.EHttpMethod eHttpMethod, @Nonnull jakarta.servlet.http.HttpServletRequest aHttpRequest, @Nonnull com.helger.web.scope.IRequestWebScope aRequestScope)
- Specified by:
createUnifiedResponsein interfacecom.helger.xservlet.handler.simple.IXServletSimpleHandler
-
initRequestState
@OverrideOnDemand @OverridingMethodsMustInvokeSuper public com.helger.commons.state.EContinue initRequestState(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.servlet.response.UnifiedResponse aUnifiedResponse)
- Specified by:
initRequestStatein interfacecom.helger.xservlet.handler.simple.IXServletSimpleHandler
-
handleRequest
public void handleRequest(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.servlet.response.UnifiedResponse aUnifiedResponse) throws jakarta.servlet.ServletException, IOException
- Specified by:
handleRequestin interfacecom.helger.xservlet.handler.simple.IXServletSimpleHandler- Throws:
jakarta.servlet.ServletExceptionIOException
-
-