net.sf.lavalamp.device
Class DeviceController

java.lang.Object
  extended by net.sf.lavalamp.device.DeviceController
All Implemented Interfaces:
Serializable

public class DeviceController
extends Object
implements Serializable

Controller which links the devices to the builds.

Author:
Steven Hale
See Also:
Serialized Form

Constructor Summary
DeviceController(BuildsChecker checker, List<DeviceBuilds> deviceBuilds)
           
 
Method Summary
 void checkAllBuilds(Pause pause, Console console)
          Checks the status of all the builds
 Build getBuild(String buildId)
           
 void setLogger(LavaLogger logger)
           
 void setStatusForBuild(String buildId, boolean successful)
           
 List<String> switchDevices(Calendar calendar)
          Switches devices off or on depending on status of builds.
protected  void turnOffOrOn(List<String> events, Builds builds, Device device)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceController

public DeviceController(BuildsChecker checker,
                        List<DeviceBuilds> deviceBuilds)
Method Detail

setLogger

public void setLogger(LavaLogger logger)

setStatusForBuild

public void setStatusForBuild(String buildId,
                              boolean successful)
                       throws MissingBuildException
Throws:
MissingBuildException

getBuild

public Build getBuild(String buildId)
               throws MissingBuildException
Throws:
MissingBuildException

checkAllBuilds

public void checkAllBuilds(Pause pause,
                           Console console)
Checks the status of all the builds

Parameters:
pause -

switchDevices

public List<String> switchDevices(Calendar calendar)
Switches devices off or on depending on status of builds.

Parameters:
calendar -
Returns:
list of events

turnOffOrOn

protected void turnOffOrOn(List<String> events,
                           Builds builds,
                           Device device)


Copyright © 2010. All Rights Reserved.