Class GenericHstComponent

java.lang.Object
org.hippoecm.hst.core.component.GenericHstComponent
All Implemented Interfaces:
HstComponent

public class GenericHstComponent extends Object implements HstComponent
The GenericHstComponent class provides a default implementation for the HstComponent interface.

It provides a base class to be subclassed to create HstComponents. Common practice is that HstComponentConfiguration's whose only purpose is layout (markup) and do not have actual behavior, use this default HstComponent implementation as their component classname, see HstComponentInfo.getComponentClassName().

A subclass of GenericHstComponent can override methods, usually one of the following:

  • doAction, to handle action requests
  • doBeforeRender, to retrieve model objects from the repository to be passed to the rendering page or servlet
  • doBeforeServeResource, to retrieve model objects from the repository to be passed to the resource serving page or servlet
  • init and destroy, to manage resources that are held for the life of the HstComponent
NOTE: HstComponent's typically run multi threaded, so take care that a HstComponent must handle concurrent requests and be careful to synchronize access to shared resources (in other words, be thread safe, see HstComponent). Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections.
Version:
$Id$