net.commerce.zocalo.experiment
Class VotingSession
java.lang.Object
net.commerce.zocalo.experiment.Session
net.commerce.zocalo.experiment.VotingSession
public class VotingSession
- extends Session
VotingSession supports an experiment in which the traders vote on a message to be
displayed to all traders in a subsequent round.
Constructor Summary |
VotingSession(java.util.Properties props,
org.mortbay.cometd.AbstractBayeux bayeux)
|
Methods inherited from class net.commerce.zocalo.experiment.Session |
aboveThresholdMessage, accrueDividendsAndBonuses, appendToErrorMessage, basicRoleForSession, belowThresholdMessage, bookFundingRequired, buildDormantArray, calculateEarnings, calculateScores, calculateScores, cannotStartRoundMessage, closeSessionAppenders, endowedRoles, endSession, endTradingLabel, eventOutcome, findSessionReplaceRoundString, getChartScale, getClaim, getCommonMessageLabel, getCurrentRound, getDividend, getDividend, getEarningsHint, getErrorMessage, getLogoPath, getMajorUnit, getMarket, getMessageLabel, getMinorUnit, getPayDividend, getPhase, getPlayer, getPriceHint, getPrivateDividend, getRemainingDividend, getRoundLabel, getRoundLabelOrDefault, getShareLimit, getSharesLabel, getShowEarnings, getTradeHistory, getTrader, getTraders, getUserOrNull, ifScoring, ifTrading, initializeRoles, initialTraderTickets, isCarryForward, lastRound, lastTradeValue, logEvent, logFileLinks, logParameterCombinations, logSessionInitialization, logTransitionEvent, make, marketIsActive, marketPrice, maxPrice, message, playerNameIterator, playerNameSortedIterator, privateDividendsInUse, provideCash, recordScoreExplanation, renderScore, replaceRoundString, reservesAreRequired, rounds, sessionEndTradingAdaptor, sessionLogger, setPhase, startNextRound, startNextRound, startNextTimedRound, startRoundActionLabel, startRoundText, startRoundTransitionLabel, startSession, startSession, stopRoundActionLabel, timeLimit, timeRemaining |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
END_VOTING_TRANSITION
public static final java.lang.String END_VOTING_TRANSITION
- See Also:
- Constant Field Values
VotingSession
public VotingSession(java.util.Properties props,
org.mortbay.cometd.AbstractBayeux bayeux)
voteText
public java.lang.String voteText(int index)
voteBefore
public boolean voteBefore(int round)
voteResultMessage
public java.lang.String voteResultMessage()
getVote
public java.lang.Integer getVote(TradingSubject trader,
int round)
getVote
public java.lang.Integer getVote(User trader,
int round)
votingComplete
public boolean votingComplete(int round)
message
public java.lang.String message(int round)
- Overrides:
message
in class Session
setVote
public void setVote(TradingSubject trader,
int proposal)
setVote
public void setVote(User trader,
int proposal)
endTrading
public void endTrading(boolean manual)
- Overrides:
endTrading
in class Session
endVoting
public void endVoting()
logCommonMessages
protected void logCommonMessages(org.apache.log4j.Logger log)
- Overrides:
logCommonMessages
in class Session
logVotingMessages
protected void logVotingMessages(org.apache.log4j.Logger log)
experimenterButtons
public java.lang.String[] experimenterButtons()
- Overrides:
experimenterButtons
in class Session
stateSpecificDisplay
public java.lang.String stateSpecificDisplay()
- Overrides:
stateSpecificDisplay
in class Session
stateSpecificTraderButtons
public java.lang.String[] stateSpecificTraderButtons()
- Overrides:
stateSpecificTraderButtons
in class Session
stateSpecificTraderHtml
public java.lang.String stateSpecificTraderHtml(java.lang.String claimName,
java.lang.String userName)
- Overrides:
stateSpecificTraderHtml
in class Session
showEarningsSummary
public java.lang.String showEarningsSummary(java.lang.String userName)
- Overrides:
showEarningsSummary
in class Session
webAction
public void webAction(java.lang.String userName,
java.lang.String parameter)
- Overrides:
webAction
in class Session