|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
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 . |
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 |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |