/** * Add an associated bean. * If the bean is a {@link LifeCycle}, then it will be managed if it is not * already started and umanaged if it is already started. The {@link #addBean(Object, boolean)} * method should be used if this is not correct, or the {@link #manage(Object)} and {@link #unmanage(Object)} * methods may be used after an add to change the status. * @param o the bean object to add * @return true if the bean was added or false if it has already been added. */ public boolean addBean(Object o) { // beans are joined unless they are started lifecycles return addBean(o,!((o instanceof LifeCycle)&&((LifeCycle)o).isStarted())); }
/** * Add an associated bean. * If the bean is a {@link LifeCycle}, then it will be managed if it is not * already started and umanaged if it is already started. The {@link #addBean(Object, boolean)} * method should be used if this is not correct, or the {@link #manage(Object)} and {@link #unmanage(Object)} * methods may be used after an add to change the status. * @param o the bean object to add * @return true if the bean was added or false if it has already been added. */ public boolean addBean(Object o) { // beans are joined unless they are started lifecycles return addBean(o,!((o instanceof LifeCycle)&&((LifeCycle)o).isStarted())); }
/** * Add an associated bean. * If the bean is a {@link LifeCycle}, then it will be managed if it is not * already started and umanaged if it is already started. The {@link #addBean(Object, boolean)} * method should be used if this is not correct, or the {@link #manage(Object)} and {@link #unmanage(Object)} * methods may be used after an add to change the status. * @param o the bean object to add * @return true if the bean was added or false if it has already been added. */ public boolean addBean(Object o) { // beans are joined unless they are started lifecycles return addBean(o,!((o instanceof LifeCycle)&&((LifeCycle)o).isStarted())); }
/** * Add an associated bean. * If the bean is a {@link LifeCycle}, then it will be managed if it is not * already started and umanaged if it is already started. The {@link #addBean(Object, boolean)} * method should be used if this is not correct, or the {@link #manage(Object)} and {@link #unmanage(Object)} * methods may be used after an add to change the status. * @param o the bean object to add * @return true if the bean was added or false if it has already been added. */ public boolean addBean(Object o) { // beans are joined unless they are started lifecycles return addBean(o,!((o instanceof LifeCycle)&&((LifeCycle)o).isStarted())); }