| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cuny.cat.ClientRegistry
edu.cuny.cat.MarketRegistry
public class MarketRegistry
A registry for a market client, which extends ClientRegistry, and
 tracks and provides additional information for decision making in the market.
| Field Summary | |
|---|---|
protected  java.util.Set<java.lang.String> | 
activeSpecialistIdSet
active specialist on the current day  | 
protected  int | 
entitlement
estimate of the entitlement of a trader each day  | 
protected  double | 
glCEMaxPrice
 | 
protected  double | 
glCEMidPrice
 | 
protected  double | 
glCEMinPrice
 | 
protected  FourHeapShoutEngine | 
globalShoutEngine
 | 
protected  int | 
numOfActiveTraders
 | 
protected  int | 
numOfBuyersInMarketDaily
 | 
protected  int | 
numOfMobileTraders
number of traders changing market within the last two consecutive days  | 
protected  int | 
numOfSellersInMarketDaily
 | 
protected  int | 
numOfStationaryTraders
number of traders staying in a same market in the last two consecutive days  | 
protected  int | 
numOfTracedTraders
number of traders that are traced on the current day  | 
protected  java.util.Map<java.lang.String,java.lang.Double> | 
specialistBalances
 | 
| Fields inherited from class edu.cuny.cat.ClientRegistry | 
|---|
day, id, shouts, specialists, traders, transactions | 
| Constructor Summary | |
|---|---|
MarketRegistry()
 | 
|
| Methods inherited from class edu.cuny.cat.ClientRegistry | 
|---|
getShout, getSpecialist, getSpecialistIds, getSpecialists, getTrader, getTraderIds, getTraders, getTransaction, processIdAssigned, processTransactionExecuted, registerTrader | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected java.util.Set<java.lang.String> activeSpecialistIdSet
protected int entitlement
protected FourHeapShoutEngine globalShoutEngine
protected double glCEMaxPrice
protected double glCEMinPrice
protected double glCEMidPrice
protected java.util.Map<java.lang.String,java.lang.Double> specialistBalances
protected int numOfBuyersInMarketDaily
protected int numOfSellersInMarketDaily
protected int numOfActiveTraders
protected int numOfTracedTraders
protected int numOfMobileTraders
protected int numOfStationaryTraders
| Constructor Detail | 
|---|
public MarketRegistry()
| Method Detail | 
|---|
public Trader addTrader(java.lang.String id,
                        java.lang.String desc,
                        boolean isSeller)
addTrader in class ClientRegistrypublic Specialist addSpecialist(java.lang.String id)
addSpecialist in class ClientRegistrypublic TraderInfo getTraderInfo(java.lang.String id)
public SpecialistInfo getSpecialistInfo(java.lang.String id)
public ExtendedSpecialistInfo getMyInfo()
public void eventOccurred(AuctionEvent event)
eventOccurred in interface AuctionEventListenereventOccurred in class ClientRegistryprotected void processGameStarting(GameStartingEvent event)
processGameStarting in class ClientRegistryprotected void processGameStarted(GameStartedEvent event)
protected void processDayOpening(DayOpeningEvent event)
processDayOpening in class ClientRegistryprotected void processFeesAnnounced(FeesAnnouncedEvent event)
protected void processRegistration(RegistrationEvent event)
processRegistration in class ClientRegistrypublic void processRegisteredTraders(RegisteredTradersAnnouncedEvent event)
protected void processDayClosed(DayClosedEvent event)
protected void registerTrader(Trader trader,
                              Specialist specialist)
registerTrader in class ClientRegistryprotected void updateTraderStatus()
protected void processShoutPlaced(ShoutPlacedEvent event)
processShoutPlaced in class ClientRegistryprotected void processShoutPosted(ShoutPostedEvent event)
processShoutPosted in class ClientRegistryprotected void processTransactionPosted(TransactionPostedEvent event)
processTransactionPosted in class ClientRegistrypublic double getGlCEMinPrice()
public double getGlCEMaxPrice()
public double getGlCEMidPrice()
public int getTraderEntitlement()
public java.lang.String[] getActiveOpponentIds()
public int getNumOfTracedTraders()
public int getNumOfActiveTraders()
public int getNumOfBuyersInMarketDaily()
public int getNumOfSellersInMarketDaily()
public int getNumOfActiveSpecialists()
public void printStatus()
printStatus in class ClientRegistry
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||