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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
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
getComponentConfiguration()
Returns the ComponentConfiguration for this component ornull
if not implemented by a subclassvoid
init(javax.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 Detail
-
init
void init(javax.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
void doBeforeRender(HstRequest request, HstResponse response) throws HstComponentException
Allows the component to do some business logic processing before rendering- Parameters:
request
-response
-- Throws:
HstComponentException
-
doAction
void doAction(HstRequest request, HstResponse response) throws HstComponentException
Allows the component to process actions- Parameters:
request
-response
-- Throws:
HstComponentException
-
doBeforeServeResource
void doBeforeServeResource(HstRequest request, HstResponse response) throws HstComponentException
Allows the component to do some business logic processing before serving resource- Parameters:
request
-response
-- Throws:
HstComponentException
-
destroy
void destroy() throws HstComponentException
Allows the component to destroy itself- Throws:
HstComponentException
-
getComponentConfiguration
default ComponentConfiguration getComponentConfiguration()
Returns the ComponentConfiguration for this component ornull
if not implemented by a subclass
-
-