Package org.exoplatform.web
Class WebRequestHandler
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.web.WebRequestHandler
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
- Direct Known Subclasses:
DefaultRequestHandler,DownloadHandler,UploadHandler
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.
-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanexecute(ControllerContext context) Execute a service.abstract StringReturns the handler name.protected abstract booleanFlag if particular handler requires lifecycle.voidonDestroy(WebAppController controller) Destroy callback.voidonInit(WebAppController controller, jakarta.servlet.ServletConfig sConfig) Init callback.Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
WebRequestHandler
public WebRequestHandler()
-
-
Method Details
-
onInit
public void onInit(WebAppController controller, jakarta.servlet.ServletConfig sConfig) throws Exception Init callback.- Parameters:
controller- the controllersConfig- the servlet config- Throws:
Exception- any exception
-
getHandlerName
Returns the handler name.- Returns:
- the handler name
-
execute
Execute a service.- Parameters:
context- the controller context- Returns:
- true if the handler was able to handle the request
- Throws:
Exception- any exception
-
onDestroy
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
RequestLifeCycleblock.
-