org.apache.struts.tiles
Interface DefinitionsFactory
- Serializable
- ComponentDefinitionsFactoryWrapper
public interface DefinitionsFactory
extends Serializable
Tiles Definition factory.
This interface replace old ComponentDefinitionsFactory.
Main method getDefinition() is exactly the same. Initialization method change.
This interface allows to retrieve a definition by its name, independently of
the factory implementation.
Object life cycle is as follow:
- Constructor: create object
- setConfig: set config and initialize factory. After first call to this
method, factory is operational.
- destroy: factory is being shutdown.
Implementation must be Serializable, in order to be compliant with web Container
having this constraint (Weblogic 6.x).
destroy
public void destroy()
Receive notification that the factory is being
shut down.
init
public void init(DefinitionsFactoryConfig config,
ServletContext servletContext)
throws DefinitionsFactoryException
Init definition factory.
This method is called immediately after factory creation, and prior any call
to setConfig().
config
- Configuration object used to set factory configuration.servletContext
- Servlet Context passed to factory.
setConfig
public void setConfig(DefinitionsFactoryConfig config,
ServletContext servletContext)
throws DefinitionsFactoryException
Set factory configuration.
This method is used to change factory configuration.
This method is optional, and can send an exception if implementation
doesn't allow change in configuration.
config
- Configuration object used to set factory configuration.servletContext
- Servlet Context passed to factory.
Copyright B) 2000-2007 - The Apache Software Foundation