Interface BrokerContext
-
- All Known Implementing Classes:
PowerTacBroker
public interface BrokerContextProvides 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.joda.time.InstantgetBaseTime()Returns the simulation base timeBrokergetBroker()Returns the org.powerac.common.Broker instanceList<String>getBrokerList()Returns the broker's list of competing brokers - non-publicStringgetBrokerUsername()Returns the broker name (username of the underlying Broker)intgetUsageRecordLength()Returns length of data array used for tracking customer consumption/productionvoidregisterMessageHandler(Object handler, Class<?> messageType)Delegates registrations to the routervoidsendMessage(Object message)Sends an outgoing message.
-
-
-
Method Detail
-
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
-
-