Class WebRequestHandler

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.web.WebRequestHandler
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public abstract class WebRequestHandler extends org.exoplatform.container.component.BaseComponentPlugin
Abstract calss that one must implement if it want to provide a dedicated handler for serving custom requests. The execute method must be impemented and the serving logic should be handled here.
  • Constructor Details

    • WebRequestHandler

      public WebRequestHandler()
  • Method Details

    • onInit

      public void onInit(WebAppController controller, jakarta.servlet.ServletConfig sConfig) throws Exception
      Init callback.
      Parameters:
      controller - the controller
      sConfig - the servlet config
      Throws:
      Exception - any exception
    • getHandlerName

      public abstract String getHandlerName()
      Returns the handler name.
      Returns:
      the handler name
    • execute

      public abstract boolean execute(ControllerContext context) throws Exception
      Execute a service.
      Parameters:
      context - the controller context
      Returns:
      true if the handler was able to handle the request
      Throws:
      Exception - any exception
    • onDestroy

      public void onDestroy(WebAppController controller)
      Destroy callback.
      Parameters:
      controller - the controller
    • getRequiresLifeCycle

      protected abstract boolean getRequiresLifeCycle()
      Flag if particular handler requires lifecycle.
      Returns:
      true if processing of particular handler requires to be wrapped within RequestLifeCycle block.