Package org.powertac.common.interfaces
Interface TariffMarket
- 
 public interface TariffMarketTariff Market Receives, validates, and stores new tariffs, enforces tariff validity rules. Generates transactions to represent tariff publication fees. Provides convenience methods to find tariffs that might be of interest to Customers.Note that all methods driven by messages from the incoming message channel are polymorphic methods that select by argument type at runtime. They all return a TariffStatus instance that can be routed back to the originating broker. - Author:
- John Collins
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description List<Tariff>getActiveTariffList(PowerType type)Returns the list of currently active tariffs for the given PowerType.TariffgetDefaultTariff(PowerType type)Returns the default tariff.voidprocessRevokedTariffs()Deprecated.voidregisterNewTariffListener(NewTariffListener listener)Registers a listener for publication of new Tariffs.booleansetDefaultTariff(TariffSpecification newTariff)Convenience method to set the default tariff at the beginning of the game.voidsubscribeToTariff(Tariff tariff, CustomerInfo customer, int customerCount)Subscribes a block of Customers from a single Customer model to the specified Tariff, as long as the Tariff has not expired.
 
- 
- 
- 
Method Detail- 
subscribeToTariffvoid subscribeToTariff(Tariff tariff, CustomerInfo customer, int customerCount) Subscribes a block of Customers from a single Customer model to the specified Tariff, as long as the Tariff has not expired. The actual subscription processing is deferred until the TariffMarket is next activated. Unsubscribe is indicated by a negative value for customerCount.
 - 
getActiveTariffListList<Tariff> getActiveTariffList(PowerType type) Returns the list of currently active tariffs for the given PowerType. The list contains only non-expired tariffs that cover the given type.
 - 
setDefaultTariffboolean setDefaultTariff(TariffSpecification newTariff) Convenience method to set the default tariff at the beginning of the game. Returns true just in case the tariff was valid and was successfully saved.
 - 
registerNewTariffListenervoid registerNewTariffListener(NewTariffListener listener) Registers a listener for publication of new Tariffs.
 - 
processRevokedTariffs@Deprecated void processRevokedTariffs() Deprecated.Revokes tariffs for which TariffRevoke messages have been received since the last time this method was called in an earlier timeslot.
 
- 
 
-