org.apache.tiles.web.startup

## Class AbstractTilesListener

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

- All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener
  Direct Known Subclasses:
    StrutsTilesListener

      public abstract class AbstractTilesListener
      extends Object
      implements javax.servlet.ServletContextListener

  Listener for the initialization of the Tiles container.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTilesListener()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `contextDestroyed(javax.servlet.ServletContextEvent event)` Destroys the initializer.
    `void` | `contextInitialized(javax.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 Detail

    - #### initializer

          protected TilesInitializer initializer

      The initializer object.
      Since:
        2.1.2

  - ### Constructor Detail

    - #### AbstractTilesListener

          public AbstractTilesListener()

  - ### Method Detail

    - #### contextInitialized

          public void contextInitialized(javax.servlet.ServletContextEvent event)

      Initialize the TilesContainer and place it into service.
      Specified by:
        `contextInitialized` in interface `javax.servlet.ServletContextListener`
      Parameters:
        `event` - The intercepted event.

    - #### contextDestroyed

          public void contextDestroyed(javax.servlet.ServletContextEvent event)

      Destroys the initializer.
      Specified by:
        `contextDestroyed` in interface `javax.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

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.