Class ContextManagerService

java.lang.Object
org.powertac.samplebroker.ContextManagerService
All Implemented Interfaces:
org.powertac.samplebroker.interfaces.Initializable

@Service
public class ContextManagerService
extends Object
implements org.powertac.samplebroker.interfaces.Initializable
Handles incoming context and bank messages with example behaviors.
Author:
John Collins
  • Constructor Summary

    Constructors 
    Constructor Description
    ContextManagerService()  
  • Method Summary

    Modifier and Type Method Description
    void handleMessage​(Properties serverProps)
    Receives the server configuration properties.
    void handleMessage​(org.powertac.common.BankTransaction btx)
    BankTransaction represents an interest payment.
    void handleMessage​(org.powertac.common.CashPosition cp)
    CashPosition updates our current bank balance.
    void handleMessage​(org.powertac.common.Competition comp)
    Handles the Competition instance that arrives at beginning of game.
    void handleMessage​(org.powertac.common.msg.DistributionReport dr)
    DistributionReport gives total consumption and production for the timeslot, summed across all brokers.
    void initialize​(org.powertac.samplebroker.interfaces.BrokerContext broker)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • initialize

      public void initialize​(org.powertac.samplebroker.interfaces.BrokerContext broker)
      Specified by:
      initialize in interface org.powertac.samplebroker.interfaces.Initializable
    • handleMessage

      public void handleMessage​(org.powertac.common.BankTransaction btx)
      BankTransaction represents an interest payment. Value is positive for credit, negative for debit.
    • handleMessage

      public void handleMessage​(org.powertac.common.CashPosition cp)
      CashPosition updates our current bank balance.
    • handleMessage

      public void handleMessage​(org.powertac.common.msg.DistributionReport dr)
      DistributionReport gives total consumption and production for the timeslot, summed across all brokers.
    • handleMessage

      public void handleMessage​(org.powertac.common.Competition comp)
      Handles the Competition instance that arrives at beginning of game. Here we capture all the customer records so we can keep track of their subscriptions and usage profiles.
    • handleMessage

      public void handleMessage​(Properties serverProps)
      Receives the server configuration properties.