package de.ugoe.cs.autoquest.htmlmonitor;

/**
 * <p>
 * TODO comment
 * </p>
 * 
 * @author Patrick Harms
 */
public class ShutdownHook implements Runnable {

    /** */
    private HtmlMonitorComponent[] components;
    
    /**
     * <p>
     * TODO: comment
     * </p>
     *
     */
    public ShutdownHook(HtmlMonitorComponent... components) {
        this.components = components;
    }

    /* (non-Javadoc)
     * @see java.lang.Thread#run()
     */
    @Override
    public void run() {
        for (HtmlMonitorComponent component : components) {
            if (component != null) {
                component.stop();
            }
        }
    }

}
