Class ContainerLifeCycle

    • Constructor Detail

      • ContainerLifeCycle

        public ContainerLifeCycle()
        Deprecated.
    • Method Detail

      • destroy

        public void destroy()
        Deprecated.
        Destroys the managed Destroyable beans in the reverse order they were added.
        Specified by:
        destroy in interface Destroyable
      • contains

        public boolean contains​(Object bean)
        Deprecated.
        Parameters:
        bean - the bean to test
        Returns:
        whether this aggregate contains the bean
      • isManaged

        public boolean isManaged​(Object bean)
        Deprecated.
        Description copied from interface: Container
        Test if this container manages a bean
        Specified by:
        isManaged in interface Container
        Parameters:
        bean - the bean to test
        Returns:
        whether this aggregate contains and manages the bean
      • isAuto

        public boolean isAuto​(Object bean)
        Deprecated.
        Parameters:
        bean - the bean to test
        Returns:
        whether this aggregate contains the bean in auto state
      • isUnmanaged

        public boolean isUnmanaged​(Object bean)
        Deprecated.
        Parameters:
        bean - the bean to test
        Returns:
        whether this aggregate contains the bean in auto state
      • addBean

        public boolean addBean​(Object o)
        Deprecated.
        Adds the given bean, detecting whether to manage it or not. If the bean is a LifeCycle, then it will be managed if it is not already started and not managed if it is already started. The addBean(Object, boolean) method should be used if this is not correct, or the manage(Object) and unmanage(Object) methods may be used after an add to change the status.
        Specified by:
        addBean in interface Container
        Parameters:
        o - the bean object to add
        Returns:
        true if the bean was added, false if it was already present
      • addBean

        public boolean addBean​(Object o,
                               boolean managed)
        Deprecated.
        Adds the given bean, explicitly managing it or not.
        Specified by:
        addBean in interface Container
        Parameters:
        o - The bean object to add
        managed - whether to managed the lifecycle of the bean
        Returns:
        true if the bean was added, false if it was already present
      • addManaged

        public void addManaged​(LifeCycle lifecycle)
        Deprecated.
        Adds a managed lifecycle.

        This is a convenience method that uses addBean(lifecycle,true) and then ensures that the added bean is started iff this container is running. Exception from nested calls to start are caught and wrapped as RuntimeExceptions

        Parameters:
        lifecycle - the managed lifecycle to add
      • manage

        public void manage​(Object bean)
        Deprecated.
        Manages a bean already contained by this aggregate, so that it is started/stopped/destroyed with this aggregate.
        Specified by:
        manage in interface Container
        Parameters:
        bean - The bean to manage (must already have been added).
      • unmanage

        public void unmanage​(Object bean)
        Deprecated.
        Unmanages a bean already contained by this aggregate, so that it is not started/stopped/destroyed with this aggregate.
        Specified by:
        unmanage in interface Container
        Parameters:
        bean - The bean to unmanage (must already have been added).
      • getBean

        public <T> T getBean​(Class<T> clazz)
        Deprecated.
        Specified by:
        getBean in interface Container
        Type Parameters:
        T - the Bean type
        Parameters:
        clazz - the class of the bean
        Returns:
        the first bean (in order added) of a specific class (or subclass), or null if no such bean exist
      • removeBeans

        public void removeBeans()
        Deprecated.
        Removes all bean
      • dump

        public void dump​(Appendable out,
                         String indent)
                  throws IOException
        Deprecated.
        Description copied from interface: Dumpable
        Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
        Specified by:
        dump in interface Dumpable
        Parameters:
        out - The appendable to dump to
        indent - The indent to apply after any new lines.
        Throws:
        IOException - if unable to write to Appendable
      • dump

        public void dump​(Appendable out)
                  throws IOException
        Deprecated.
        Dump this object to an Appendable with no indent.
        Parameters:
        out - The appendable to dump to.
        Throws:
        IOException - May be thrown by the Appendable
      • updateBean

        public void updateBean​(Object oldBean,
                               Object newBean)
        Deprecated.
      • updateBean

        public void updateBean​(Object oldBean,
                               Object newBean,
                               boolean managed)
        Deprecated.
      • updateBeans

        public void updateBeans​(Object[] oldBeans,
                                Object[] newBeans)
        Deprecated.
      • getContainedBeans

        public <T> Collection<T> getContainedBeans​(Class<T> clazz)
        Deprecated.
        Specified by:
        getContainedBeans in interface Container
        Type Parameters:
        T - the Bean type
        Parameters:
        clazz - the class of the beans
        Returns:
        the list of beans of the given class from the entire Container hierarchy. The order is primarily depth first and secondarily added order.