Interface BrokerContext

All Known Implementing Classes:
PowerTacBroker

public interface BrokerContext
Provides message handler registration, along with access to competition context information, including
  • The message router for outgoing messages
  • The underlying org.powertac.common.Broker instance
  • The name of this broker
  • The base time for the current simulation
  • The length of common data arrays
Author:
John Collins
  • Method Details

    • registerMessageHandler

      void registerMessageHandler​(Object handler, Class<?> messageType)
      Delegates registrations to the router
    • sendMessage

      void sendMessage​(Object message)
      Sends an outgoing message. May need to be reimplemented in a remote broker.
    • getBroker

      Broker getBroker()
      Returns the org.powerac.common.Broker instance
    • getBrokerUsername

      String getBrokerUsername()
      Returns the broker name (username of the underlying Broker)
    • getBaseTime

      org.joda.time.Instant getBaseTime()
      Returns the simulation base time
    • getUsageRecordLength

      int getUsageRecordLength()
      Returns length of data array used for tracking customer consumption/production
    • getBrokerList

      List<String> getBrokerList()
      Returns the broker's list of competing brokers - non-public