Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.picocontainer.lifecycle
Class CompositeLifecycleStrategy

    java.lang.Object
      org.picocontainer.lifecycle.CompositeLifecycleStrategy

All Implemented Interfaces:
  LifecycleStrategy

    public class CompositeLifecycleStrategy

extends Object
implements LifecycleStrategy

Allow for use of alternate LifecycleStrategy strategies to be used at the same time. A component can be started/stopped/disposed according to *any* of the supplied LifecycleStrategy instances.

Author:
  Paul Hammant

Constructor Summary
`CompositeLifecycleStrategy(StartableLifecycleStrategy... alternateStrategies)`

Method Summary
`void` | `dispose(Object component)` Invoke the "dispose" method on the component instance if this is disposable.
`boolean` | `hasLifecycle(Class<?> type)` Test if a component instance has a lifecycle.
`void` | `start(Object component)` Invoke the "start" method on the component instance if this is startable.
`void` | `stop(Object component)` Invoke the "stop" method on the component instance if this is stoppable.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompositeLifecycleStrategy

    public CompositeLifecycleStrategy(StartableLifecycleStrategy... alternateStrategies)

Method Detail

### start

    public void start(Object component)

  Description copied from interface: `LifecycleStrategy`
  Invoke the "start" method on the component instance if this is startable. It is up to the implementation of the strategy what "start" and "startable" means.

  Specified by:
    `start` in interface `LifecycleStrategy`
  Parameters:
    `component` - the instance of the component to start

### stop

    public void stop(Object component)

  Description copied from interface: `LifecycleStrategy`
  Invoke the "stop" method on the component instance if this is stoppable. It is up to the implementation of the strategy what "stop" and "stoppable" means.

  Specified by:
    `stop` in interface `LifecycleStrategy`
  Parameters:
    `component` - the instance of the component to stop

### dispose

    public void dispose(Object component)

  Description copied from interface: `LifecycleStrategy`
  Invoke the "dispose" method on the component instance if this is disposable. It is up to the implementation of the strategy what "dispose" and "disposable" means.

  Specified by:
    `dispose` in interface `LifecycleStrategy`
  Parameters:
    `component` - the instance of the component to dispose

### hasLifecycle

    public boolean hasLifecycle(Class<?> type)

  Description copied from interface: `LifecycleStrategy`
  Test if a component instance has a lifecycle.

  Specified by:
    `hasLifecycle` in interface `LifecycleStrategy`
  Parameters:
    `type` - the component's type
  Returns:
    `true` if the component has a lifecycle

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 Codehaus. All Rights Reserved.