net.dpml.test.lifecycle
Class StartableComponent

java.lang.Object
  extended by net.dpml.test.lifecycle.StartableComponent

public class StartableComponent
extends Object

Test component that provides feedback on the application of lifecycle stages handled by the container.

Version:
1.2.0
Author:
Digital Product Meta Library

Constructor Summary
StartableComponent(Logger logger)
          Creation of a new startable component instance.
 
Method Summary
 void start()
          Start the component.
 void stop()
          Stop the component.
 boolean wasStarted()
          Utility to test if the component was stated (used in JUnit test).
 boolean wasStopped()
          Utility to test if the component was stopped (used in JUnit test).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartableComponent

public StartableComponent(Logger logger)
Creation of a new startable component instance.

Parameters:
logger - the assingned logging channel
Method Detail

start

public void start()
Start the component.


stop

public void stop()
Stop the component.


wasStarted

public boolean wasStarted()
Utility to test if the component was stated (used in JUnit test).

Returns:
true if the start operation was invoked

wasStopped

public boolean wasStopped()
Utility to test if the component was stopped (used in JUnit test).

Returns:
true if the stop operation was invoked