Package net.commerce.zocalo.experiment.states

These classes represent the states and state transitions used in experiments.

See:
          Description

Interface Summary
JudgingSessionState These classes represent the states when we are running an experiment with Judges and Manipulators.
JudgingStatusAdaptorI Parent of JudgingStatusAdaptors.
JudgingTransitionAdaptorI Parent of JudgingTransitionAdaptors.
SessionState These classes represent the states when we are running standard experiments.
SessionStatusAdaptor StatusAdaptors are used to take an action if the session is in a particular state.
StateHolder Holds the state for a Session.
StatusAdaptor StatusAdaptor are used to take a state-dependent action.
TransitionAdaptor TransitionAdaptors are used when requesting a state transition.
VotingStatusAdaptorI  
VotingTransitionAdaptorI Parent of VotingTransitionAdaptors.
 

Class Summary
JudgingSessionState.JudgingInitializedState  
JudgingSessionState.JudgingScoringState  
JudgingSessionState.JudgingState  
JudgingSessionState.JudgingTradingState  
JudgingSessionState.NoAction  
JudgingStateHolder Refinement of StateHolder when Judging.
JudgingStatusAdaptor Combines StatusAdaptor and JudgingStatusAdaptorI.
JudgingTransitionAdaptor Combines TransitionAdaptor and JudgingTransitionAdaptorI.
NoActionJudgingStatusAdaptor Parent of JudgingStatusAdaptors.
NoActionJudgingTransitionAdaptor Parent of JudgingTransitionAdaptors.
NoActionStatusAdaptor Parent of StatusAdaptors.
NoActionTransitionAdaptor Parent of TransitionAdaptors.
NoActionVotingStatusAdaptor Parent of VotingStatusAdaptors.
NoActionVotingTransitionAdaptor Parent of VotingTransitionAdaptors.
SessionState.InitializedState  
SessionState.NoAction  
SessionState.ScoringState  
SessionState.TradingState  
StandardStateHolder StateHolder for a standard format experiment that has states for trading and score display.
VotingStateHolder Refinement of StateHolder when Voting.
VotingStatusAdaptor  
VotingTransitionAdaptor Combines TransitionAdaptor and VotingTransitionAdaptorI.
 

Package net.commerce.zocalo.experiment.states Description

These classes represent the states and state transitions used in experiments. There are currently three sets of classes, supporting states for Standard experiments, for Judging experiments, and for Voting Experiments. Standard experiments alternate between trading and displaying scores. Judging adds some participants who don't trade, and who provide estimates of the value of the traded good based on trading patterns. Voting experiments allow the traders to vote on a message to be displayed in a subsequent round in order to investigate the effect of communication and exogenous information.

State objects (SessionState, JudgingSessionState, VotingSessionState) choose an appropriate action for the current state, using StatusAdaptors (SessionStatusAdaptor, VotingStatusAdaptor, JudgingStatusAdaptor) for the callbacks. StateHolders (StandardStateHolder, VotingStateHolder, JudgingStateHolder) know what state transitions are allowed, and use TransitionAdaptors (JudgingTransitionAdaptor, VotingTransitionAdaptor) for the callbacks.

All StateHolder subclasses that will use the standard Session implementation must support the standard states: trading and showingScores. They can add as many other states as are useful.

The idea with the various adaptors is that the caller sets up a callback with messages that are appropriate for all the states that matter to it. When invoked, one of the state-dependent methods will be called. TransitionAdaptors are provide when requesting a state transition. If the transition is successful (if the StateHolder's currentState returns true to the transition request message), then the transition will be made and the adaptor called to invoke any necessary processing at the transition. StatusAdaptors are useful for taking an action if a particular state is active. The callback is only invoked in the appropriate state. The abstract implementations ( NoActionStatusAdaptor NoActionJudgingStatusAdaptor, NoActionVotingStatusAdaptor, NoActionTransitionAdaptor NoActionVotingTransitionAdaptor, NoActionJudgingTransitionAdaptor) of the adaptors take no action, so concrete classes only have to implement any methods that need to take an action. There is often only one method to implement.


© Copyright 2008 Chris Hibbert. All rights reserved.

This software is published under the terms of the MIT license, a copy
of which has been included with this distribution in the LICENSE file.