@Service public class OfficeComplexCustomerService extends TimeslotPhaseProcessor implements NewTariffListener, InitializationService, CustomerServiceAccessor
| Constructor and Description |
|---|
OfficeComplexCustomerService()
This is the constructor of the Office Consumer Service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.joda.time.Instant time,
int phaseNumber)
This method gets called once during each timeslot.
|
void |
clearConfiguration()
This function cleans the configuration files in case they have not been
cleaned at the beginning of the game
|
List<CustomerInfo> |
generateCustomerInfoList()
This function finds all the available Office Consumers in the competition
and creates a list of their customerInfo.
|
String |
getConfigFile1()
Getter method for the first configuration file
|
CustomerRepo |
getCustomerRepo()
Returns a reference to a CustomerRepo
|
List<OfficeComplex> |
getOfficeComplexList()
This function returns the list of the villages created at the beginning of
the game by the service
|
RandomSeedRepo |
getRandomSeedRepo()
Returns a reference to a RandomSeedRepo
|
ServerConfiguration |
getServerConfiguration()
Returns a reference to a ServerConfiguration service
|
TariffRepo |
getTariffRepo()
Returns a reference to a TariffRepo
|
TariffSubscriptionRepo |
getTariffSubscriptionRepo()
Returns a reference to a TariffSubscriptionRepo
|
TimeService |
getTimeService()
Returns a reference to the TimeService
|
TimeslotRepo |
getTimeslotRepo()
Returns a reference to a TimeslotRepo
|
WeatherReportRepo |
getWeatherReportRepo()
Returns a reference to a WeatherReportRepo
|
String |
initialize(Competition competition,
List<String> completedInits)
This function called once at the beginning of each game by the server
initialization service.
|
void |
publishNewTariffs(List<Tariff> tariffs)
Called periodically with a list of newly-published Tariffs
|
void |
setConfigFile1(String config) |
init, setTimeslotPhasepublic OfficeComplexCustomerService()
public String initialize(Competition competition, List<String> completedInits)
initialize in interface InitializationServicepublic void publishNewTariffs(List<Tariff> tariffs)
NewTariffListenerpublishNewTariffs in interface NewTariffListenerpublic String getConfigFile1()
@ConfigurableValue(valueType="String", description="first configuration file of the office complex customers") public void setConfigFile1(String config)
public List<OfficeComplex> getOfficeComplexList()
public void clearConfiguration()
public List<CustomerInfo> generateCustomerInfoList()
public void activate(org.joda.time.Instant time,
int phaseNumber)
TimeslotPhaseProcessoractivate in class TimeslotPhaseProcessorpublic CustomerRepo getCustomerRepo()
CustomerServiceAccessorgetCustomerRepo in interface CustomerServiceAccessorpublic RandomSeedRepo getRandomSeedRepo()
CustomerServiceAccessorgetRandomSeedRepo in interface CustomerServiceAccessorpublic TariffRepo getTariffRepo()
CustomerServiceAccessorgetTariffRepo in interface CustomerServiceAccessorpublic TariffSubscriptionRepo getTariffSubscriptionRepo()
CustomerServiceAccessorgetTariffSubscriptionRepo in interface CustomerServiceAccessorpublic TimeslotRepo getTimeslotRepo()
CustomerServiceAccessorgetTimeslotRepo in interface CustomerServiceAccessorpublic TimeService getTimeService()
CustomerServiceAccessorgetTimeService in interface CustomerServiceAccessorpublic WeatherReportRepo getWeatherReportRepo()
CustomerServiceAccessorgetWeatherReportRepo in interface CustomerServiceAccessorpublic ServerConfiguration getServerConfiguration()
CustomerServiceAccessorgetServerConfiguration in interface CustomerServiceAccessorCopyright © 2017 Power TAC. All rights reserved.