diff --git a/voting-booth/src/main/java/meerkat/voting/controller/VotingBoothImpl.java b/voting-booth/src/main/java/meerkat/voting/controller/VotingBoothImpl.java index 92c1e5e..4903424 100644 --- a/voting-booth/src/main/java/meerkat/voting/controller/VotingBoothImpl.java +++ b/voting-booth/src/main/java/meerkat/voting/controller/VotingBoothImpl.java @@ -20,11 +20,16 @@ import java.util.Map; import java.util.concurrent.LinkedBlockingQueue; /** - * Created by hai on 28/03/16. + * An asynchronous implementation of the VotingBoothController. + * This implementation binds the other components (storage, ui, output device, and crypto manager), + * and runs as its own thread controlling the whole VB process. + * The high level details are that it has a queue of commands to handle in order, and a State object which keeps + * all data from previous tasks which is necessary for the next task. + * It calls executions in the UI and output device asynchronously. */ public class VotingBoothImpl implements VotingBoothController { - private final Logger logger = LoggerFactory.getLogger(VotingBoothImpl.class);; + private final Logger logger = LoggerFactory.getLogger(VotingBoothImpl.class); // the component interfaces of the Voting Booth private BallotOutputDevice outputDevice; @@ -34,7 +39,6 @@ public class VotingBoothImpl implements VotingBoothController { // election details and info private List questionsForChoosingChannel; - private List questions; private QuestionSelector questionSelector; private Map systemMessages; @@ -82,8 +86,8 @@ public class VotingBoothImpl implements VotingBoothController { logger.info("init: setting the election parameters"); this.questionsForChoosingChannel = electionParams.getChannelChoiceQuestionsList(); - this.questions = electionParams.getRaceQuestionsList(); - this.questionSelector = new SimpleListCategoriesSelector(this.questions, electionParams.getSelectionData()); + List questions = electionParams.getRaceQuestionsList(); + this.questionSelector = new SimpleListCategoriesSelector(questions, electionParams.getSelectionData()); logger.info("init: setting finished"); }