org.richfaces.application

## Class InitializationListener

- java.lang.Object
- - org.richfaces.application.InitializationListener

- All Implemented Interfaces:
    EventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListener

      public class InitializationListener
      extends Object
      implements javax.faces.event.SystemEventListener

  Listens for application's `PostConstructApplicationEvent` and `PreDestroyApplicationEvent` events in order to initialize RichFaces services.

  Since:
    4.0
  Author:
    Nick Belaevski

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InitializationListener()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addDefaultModules(List<Module> modules)` Adds default application modules
    `protected ServicesFactory` | `createFactory()` Creates `ServiceFactory` that holds references to RichFaces application singletons
    `boolean` | `isListenerForSource(Object source)`
    `protected void` | `onStart()` Called on application startup
    `protected void` | `onStop()` Called when application is being destroyed
    `void` | `processEvent(javax.faces.event.SystemEvent event)`

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

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

- - ### Constructor Detail

    - #### InitializationListener

          public InitializationListener()

  - ### Method Detail

    - #### onStart

          protected void onStart()

      Called on application startup

    - #### onStop

          protected void onStop()

      Called when application is being destroyed

    - #### createFactory

          protected ServicesFactory createFactory()

      Creates `ServiceFactory` that holds references to RichFaces application singletons

    - #### addDefaultModules

          protected void addDefaultModules(List<Module> modules)

      Adds default application modules

    - #### processEvent

          public void processEvent(javax.faces.event.SystemEvent event)
                            throws javax.faces.event.AbortProcessingException

      Specified by:
        `processEvent` in interface `javax.faces.event.SystemEventListener`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### isListenerForSource

          public boolean isListenerForSource(Object source)

      Specified by:
        `isListenerForSource` in interface `javax.faces.event.SystemEventListener`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.