org.powertac.server
Class CompetitionSetupService

java.lang.Object
  extended by org.powertac.server.CompetitionSetupService
All Implemented Interfaces:
org.powertac.common.interfaces.CompetitionSetup

@Service
public class CompetitionSetupService
extends Object
implements org.powertac.common.interfaces.CompetitionSetup

Manages command-line and file processing for pre-game simulation setup. A simulation can be started in one of two ways:

Author:
John Collins

Constructor Summary
CompetitionSetupService()
          Standard constructor
 
Method Summary
 String bootSession(String bootFilename, String config, String logSuffix)
           
 void preGame()
          Pre-game server setup - creates the basic configuration elements to make them accessible to the web-based game-setup functions.
 boolean preGame(URL bootFile)
          Sets up the simulator, with config overrides provided in a file containing a sequence of PluginConfig instances.
 void processCmdLine(String[] args)
          Processes command-line arguments, which means looking for the specified script file and processing that
 String simSession(String bootData, String config, String jmsUrl, String logfileSuffix, List<String> brokerUsernames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompetitionSetupService

public CompetitionSetupService()
Standard constructor

Method Detail

processCmdLine

public void processCmdLine(String[] args)
Processes command-line arguments, which means looking for the specified script file and processing that


bootSession

public String bootSession(String bootFilename,
                          String config,
                          String logSuffix)
Specified by:
bootSession in interface org.powertac.common.interfaces.CompetitionSetup

simSession

public String simSession(String bootData,
                         String config,
                         String jmsUrl,
                         String logfileSuffix,
                         List<String> brokerUsernames)
Specified by:
simSession in interface org.powertac.common.interfaces.CompetitionSetup

preGame

public void preGame()
Pre-game server setup - creates the basic configuration elements to make them accessible to the web-based game-setup functions. This method must be called when the server is started, and again at the completion of each simulation. The actual simulation is started with a call to competitionControlService.runOnce().

Specified by:
preGame in interface org.powertac.common.interfaces.CompetitionSetup

preGame

public boolean preGame(URL bootFile)
Sets up the simulator, with config overrides provided in a file containing a sequence of PluginConfig instances. Errors are logged if one or more PluginConfig instances cannot be used in the current server setup.



Copyright © 2012 Power TAC. All Rights Reserved.