Package: grails.core

## [Groovy] Interface GrailsApplicationLifeCycle

-     interface GrailsApplicationLifeCycle

  API which plugins implement to provide behavior in defined application lifecycle hooks. The GrailsApplicationLifeCycle.doWithSpring method can be used register Spring beans.

  Since:
    3.0
  See Also:
    Plugin

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `abstract void` | `doWithApplicationContext()` Invoked once the org.springframework.context.ApplicationContext has been refreshed and after {#doWithDynamicMethods()} is invoked.
    `` | `abstract void` | `doWithDynamicMethods()` Invoked once the org.springframework.context.ApplicationContext has been refreshed in a phase where plugins can add dynamic methods.
    `` | `abstract groovy.lang.Closure` | `doWithSpring()` Sub classes should override to provide implementations
    `` | `abstract void` | `onConfigChange(java.util.Map<java.lang.String, java.lang.Object> event)` Invoked when the application configuration changes
    `` | `abstract void` | `onShutdown(java.util.Map<java.lang.String, java.lang.Object> event)` Invoked when the org.springframework.context.ApplicationContext is closed
    `` | `abstract void` | `onStartup(java.util.Map<java.lang.String, java.lang.Object> event)` Invoked once all prior initialization hooks: GrailsApplicationLifeCycle.doWithSpring, GrailsApplicationLifeCycle.doWithDynamicMethods and GrailsApplicationLifeCycle.doWithApplicationContext

- - ### Method Detail

    - #### abstract void doWithApplicationContext()

      Invoked once the org.springframework.context.ApplicationContext has been refreshed and after {#doWithDynamicMethods()} is invoked. Subclasses should override

    - #### abstract void doWithDynamicMethods()

      Invoked once the org.springframework.context.ApplicationContext has been refreshed in a phase where plugins can add dynamic methods. Subclasses should override

    - #### abstract groovy.lang.Closure doWithSpring()

      Sub classes should override to provide implementations

      Returns:
        A closure that defines beans to be registered by Spring

    - #### abstract void onConfigChange(java.util.Map<java.lang.String, java.lang.Object> event)

      Invoked when the application configuration changes

      Parameters:
        `event` - The event

    - #### abstract void onShutdown(java.util.Map<java.lang.String, java.lang.Object> event)

      Invoked when the org.springframework.context.ApplicationContext is closed

      Parameters:
        `event` - The event

    - #### abstract void onStartup(java.util.Map<java.lang.String, java.lang.Object> event)

      Invoked once all prior initialization hooks: GrailsApplicationLifeCycle.doWithSpring, GrailsApplicationLifeCycle.doWithDynamicMethods and GrailsApplicationLifeCycle.doWithApplicationContext

      Parameters:
        `event` - The event