Mercurial > hg > RemoteEditor > REPSessionManager
view test/mergertest/UserSimulator.java @ 420:5c95a9020e31
Modify ServerMainLoop
author | one |
---|---|
date | Fri, 13 Feb 2009 19:13:50 +0900 |
parents | |
children |
line wrap: on
line source
package test.mergertest; import java.util.LinkedList; import rep.REP; import rep.REPCommand; public class UserSimulator extends Thread { private RemoteEditorSimulator editor; private LinkedList<REPCommand> userInputList; public UserSimulator(RemoteEditorSimulator editor){ this.editor = editor; int eid = editor.getEID(); userInputList = new LinkedList<REPCommand>(); int count = 0; for(int i = 0; i < 3; i++){ userInputList.add(new REPCommand(REP.REPCMD_INSERT_USER, 0, eid, count, 3, " User:" + eid + ":" + i)); count++; } } public void setUserInput(LinkedList<REPCommand> list){ userInputList = list; } @Override public void run(){ for(REPCommand command : userInputList){ editor.edit(command); } } }