Package org.apache.tiles.web.startup

# Class AbstractTilesListener

java.lang.Object
org.apache.tiles.web.startup.AbstractTilesListener

All Implemented Interfaces:
  `jakarta.servlet.ServletContextListener`, `EventListener`

Direct Known Subclasses:
  `StrutsTilesListener`

public abstract class AbstractTilesListener extends Object implements jakarta.servlet.ServletContextListener
Listener for the initialization of the Tiles container.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected TilesInitializer`
  `initializer`
  The initializer object.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractTilesListener()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `contextDestroyed(jakarta.servlet.ServletContextEvent event)`
  Destroys the initializer.
  `void`
  `contextInitialized(jakarta.servlet.ServletContextEvent event)`
  Initialize the TilesContainer and place it into service.
  `protected abstract TilesInitializer`
  `createTilesInitializer()`
  Creates a new instance of `TilesInitializer`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### initializer

    protected TilesInitializer initializer
    The initializer object.
    Since:
      2.1.2

- ## Constructor Details

  - ### AbstractTilesListener

    public AbstractTilesListener()

- ## Method Details

  - ### contextInitialized

    public void contextInitialized(jakarta.servlet.ServletContextEvent event)
    Initialize the TilesContainer and place it into service.
    Specified by:
      `contextInitialized` in interface `jakarta.servlet.ServletContextListener`
    Parameters:
      `event` - The intercepted event.

  - ### contextDestroyed

    public void contextDestroyed(jakarta.servlet.ServletContextEvent event)
    Destroys the initializer.
    Specified by:
      `contextDestroyed` in interface `jakarta.servlet.ServletContextListener`
    Parameters:
      `event` - The intercepted event.

  - ### createTilesInitializer

    protected abstract TilesInitializer createTilesInitializer()
    Creates a new instance of `TilesInitializer`. Implement it to use a different initializer.
    Returns:
      The Tiles servlet-based initializer.
    Since:
      2.2.0