org.qi4j.api.activation

## Interface Activation

- All Known Subinterfaces:
    Application, Layer

      public interface Activation

  Interface used by Structure elements and Services that can be activated and passivated.

  Application and Layer expose this interface so you can activate and passivate them.

  Module and ServiceComposite activation/passivation is handled by the Zest runtime.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` Activate.
    `void` | `passivate()` Passivate.

- - ### Method Detail

    - #### activate

          void activate()
                        throws ActivationException

      Activate.

      Fail fast execution order is:

      - Fire `ActivationEvent.EventType.ACTIVATING`
      - Call `Activator.beforeActivation(java.lang.Object)` on each Activator
      - Call `activate()` children
      - Call `Activator.afterActivation(java.lang.Object)` on each Activator
      - Fire `ActivationEvent.EventType.ACTIVATED`

      If an Exception is thrown, already activated nodes are passivated.

      Throws:
        `ActivationException` - with first Exception of activation plus the PassivationException if any

    - #### passivate

          void passivate()
                         throws PassivationException

      Passivate.

      Fail safe execution order is:

      - Fire `ActivationEvent.EventType.PASSIVATING`
      - Call `Activator.beforePassivation(java.lang.Object)` on each Activator
      - Call `passivate()` children
      - Call `Activator.afterPassivation(java.lang.Object)` on each Activator
      - Fire `ActivationEvent.EventType.PASSIVATED`
      Throws:
        `PassivationException` - after passivation with all Exceptions of passivation if any