org.eclipse.net4j.util.lifecycle

## Class LifecycleHook<T extends ILifecycle>

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.net4j.util.lifecycle.LifecycleHook<T>

- All Implemented Interfaces:
    INotifier, IDeactivateable, ILifecycle, ILifecycle.DeferrableActivation

      public class LifecycleHook<T extends ILifecycle>
      extends Lifecycle

  Since:
    3.8
  Author:
    Eike Stepper

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `ILifecycle.DeferrableActivation`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LifecycleHook()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `delegateAboutToActivate(T delegate)`
    `protected void` | `delegateAboutToDeactivate(T delegate)`
    `protected void` | `delegateActivated(T delegate)`
    `protected void` | `delegateChanged(T oldDelegate, T newDelegate)`
    `protected void` | `delegateDeactivated(T delegate)`
    `protected void` | `delegateEvent(T delegate, IEvent event)`
    `protected void` | `doActivate()`
    `protected void` | `doDeactivate()`
    `protected T` | `getDelegate()`
    `protected void` | `hookDelegate(T delegate)`
    `protected boolean` | `hookInactiveDelegates()`
    `protected void` | `setDelegate(T delegate)`
    `protected void` | `unhookDelegate(T delegate)`

    - ### Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener`

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

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

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Constructor Detail

    - #### LifecycleHook

          public LifecycleHook()

  - ### Method Detail

    - #### getDelegate

          protected final T getDelegate()

    - #### setDelegate

          protected final void setDelegate(T delegate)

    - #### delegateChanged

          protected void delegateChanged(T oldDelegate,
                                         T newDelegate)

    - #### delegateEvent

          protected void delegateEvent(T delegate,
                                       IEvent event)

    - #### delegateAboutToActivate

          protected void delegateAboutToActivate(T delegate)

    - #### delegateActivated

          protected void delegateActivated(T delegate)

    - #### delegateAboutToDeactivate

          protected void delegateAboutToDeactivate(T delegate)

    - #### delegateDeactivated

          protected void delegateDeactivated(T delegate)

    - #### doActivate

          protected void doActivate()
                             throws java.lang.Exception

      Overrides:
        `doActivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doDeactivate

          protected void doDeactivate()
                               throws java.lang.Exception

      Overrides:
        `doDeactivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### hookDelegate

          protected void hookDelegate(T delegate)

    - #### unhookDelegate

          protected void unhookDelegate(T delegate)

    - #### hookInactiveDelegates

          protected boolean hookInactiveDelegates()

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html