Class NullLifecycleStrategy

java.lang.Object
org.picocontainer.lifecycle.NullLifecycleStrategy
All Implemented Interfaces:
Serializable, LifecycleStrategy

public class NullLifecycleStrategy extends Object implements LifecycleStrategy, Serializable
Lifecycle strategy that does nothing.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dispose(Object component)
    Invoke the "dispose" method on the component instance if this is disposable.
    boolean
    Test if a component instance has a lifecycle.
    boolean
    Is a component eager (not lazy) in that it should start when start() or equivalent is called, or lazy (it will only start on first getComponent() ).
    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 Details

    • NullLifecycleStrategy

      public NullLifecycleStrategy()
  • Method Details

    • start

      public void start(Object component)
      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)
      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)
      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)
      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
    • isLazy

      public boolean isLazy(ComponentAdapter<?> adapter)
      Description copied from interface: LifecycleStrategy
      Is a component eager (not lazy) in that it should start when start() or equivalent is called, or lazy (it will only start on first getComponent() ). The default is the first of those two.
      Specified by:
      isLazy in interface LifecycleStrategy
      Parameters:
      adapter -
      Returns:
      true if lazy, false if not lazy