Mercurial > hg > RemoteEditor > REPSessionManager
view test/sematest/PutTester.java @ 231:b837feb00132
*** empty log message ***
author | pin |
---|---|
date | Sun, 31 Aug 2008 18:50:08 +0900 |
parents | f816e0cbe6fd |
children | c52e0e831d91 |
line wrap: on
line source
package test.sematest; import java.nio.ByteBuffer; import java.util.LinkedList; import rep.REP; import rep.REPCommand; public class PutTester extends Tester { public PutTester(String name, String _host, int _port) { super(name, _host, _port); } @Override public void sendCommands(){ if(commandList == null) return; if(channel == null) return; REPCommand command = commandList.get(0); for(int i = 0; i < 5; i++){ channel.write(command); ns.writeLog("send command : "+command, 1); } } public static void main(String[] args){ REPCommand command = new REPCommand(); command.setCMD(REP.SMCMD_PUT); command.setString("PutTest.txt"); LinkedList<REPCommand> commands = new LinkedList<REPCommand>(); commands.add(command); Tester tester = new PutTester("PutTester", "localhost", 8766); tester.setCommands(commands); tester.start(); } }