Package org.hippoecm.hst.core.component
Interface HstComponent
- All Known Implementing Classes:
GenericHstComponent
public interface HstComponent
A HstComponent can be invoked by a HstComponent container
during three different request lifecycle phases: ACTION, RESOURCE and RENDER.
A HstComponent should be implemented to be thread-safe
because the HST container create one instance to serve each request.
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Allows the component to destroy itselfvoid
doAction
(HstRequest request, HstResponse response) Allows the component to process actionsvoid
doBeforeRender
(HstRequest request, HstResponse response) Allows the component to do some business logic processing before renderingvoid
doBeforeServeResource
(HstRequest request, HstResponse response) Allows the component to do some business logic processing before serving resourcedefault ComponentConfiguration
Returns the ComponentConfiguration for this component ornull
if not implemented by a subclassvoid
init
(jakarta.servlet.ServletContext servletContext, ComponentConfiguration componentConfig) Allows the component to initialize itselfdefault void
prepareBeforeRender
(HstRequest request, HstResponse response) This method is invoked beforedoBeforeRender(HstRequest, HstResponse)
method to give an HstComponent a chance to prepare any business service invocation(s).
-
Method Details
-
init
void init(jakarta.servlet.ServletContext servletContext, ComponentConfiguration componentConfig) throws HstComponentException Allows the component to initialize itself- Parameters:
servletContext
- the servletConfig of the HST container servletcomponentConfig
- the componentConfigBean configuration- Throws:
HstComponentException
-
prepareBeforeRender
default void prepareBeforeRender(HstRequest request, HstResponse response) throws HstComponentException This method is invoked beforedoBeforeRender(HstRequest, HstResponse)
method to give an HstComponent a chance to prepare any business service invocation(s). This method can be implemented to prepare business content objects by creating asynchronous jobs in parallel without having to wait each component'sdoBeforeRender(HstRequest, HstResponse)
execution sequentially.- Parameters:
request
-response
-- Throws:
HstComponentException
-
doBeforeRender
Allows the component to do some business logic processing before rendering- Parameters:
request
-response
-- Throws:
HstComponentException
-
doAction
Allows the component to process actions- Parameters:
request
-response
-- Throws:
HstComponentException
-
doBeforeServeResource
Allows the component to do some business logic processing before serving resource- Parameters:
request
-response
-- Throws:
HstComponentException
-
destroy
Allows the component to destroy itself- Throws:
HstComponentException
-
getComponentConfiguration
Returns the ComponentConfiguration for this component ornull
if not implemented by a subclass
-