Class LifeCycleComponent

  • All Implemented Interfaces:
    ComponentLifeCycle
    Direct Known Subclasses:
    HarvestJobManager

    public class LifeCycleComponent
    extends Object
    implements ComponentLifeCycle
    Takes care of the lifecycling of subcomponents(children).

    When extending this class you must:

    1. Add all lifecycle subcomponents with the addChild, before the start method is called.
    2. Call the super.start() operation to start the children.
    3. Call the super.shutdown operation to
    • Constructor Detail

      • LifeCycleComponent

        public LifeCycleComponent()
    • Method Detail

      • start

        public void start()
        Description copied from interface: ComponentLifeCycle
        Implements functionality for starting an instances of this ComponentLifeCycle object. This may be loading files, establish connections, initializing data, starting threads, etc.
        Specified by:
        start in interface ComponentLifeCycle
      • shutdown

        public void shutdown()
        Description copied from interface: ComponentLifeCycle
        The inverse of the start() method. Contains functionality for deallocation of ressources, clearing data, closing connections, stopping threads, etc
        Specified by:
        shutdown in interface ComponentLifeCycle
      • addChild

        public void addChild​(ComponentLifeCycle childComponent)
        Adds a child ComponentLifeCycle. The childs lifecycle will be managed by by the LifeCycleComponent.
        Parameters:
        childComponent - The child to add