diff rep/REPCommand.java @ 141:6f15a8880ed8

*** empty log message ***
author pin
date Wed, 27 Aug 2008 20:43:44 +0900
parents 53bf80576e84
children 0bf7f8d0f5f7
line wrap: on
line diff
--- a/rep/REPCommand.java	Wed Aug 27 20:23:39 2008 +0900
+++ b/rep/REPCommand.java	Wed Aug 27 20:43:44 2008 +0900
@@ -1,5 +1,7 @@
 package rep;
 
+import remoteeditor.network.REP;
+
 public class REPCommand {
 	public static REPCommand SMCMD_SESSION_JOIN = new REPCommand(REP.SMCMD_SM_JOIN, 0, 0, 0, 0, 0, "");
 	public int cmd;
@@ -9,7 +11,8 @@
 	public int len;
 	public int lineno;
 	public boolean stat;
-	
+	public boolean throughMaster;
+
 	public  String string;
 	private int textsiz;
 	String host;
@@ -23,12 +26,15 @@
 		this.textsiz = textsiz;
 		this.lineno = lineno;
 		this.string = string;
+		this.throughMaster = false;
+	}
+	public REPCommand(REPCommand cmd){
+		this(cmd.cmd, cmd.sid, cmd.eid, cmd.seq, cmd.lineno, cmd.string.length(), new String(cmd.string));
 	}
 
 	public REPCommand() {
 		// TODO Auto-generated constructor stub
 	}
-
 	public String toString(){
 		String repCmdString = new String(cmd + "," + sid + "," + eid + "," + seq + "," + lineno + "," + textsiz + "," + string);
 		return repCmdString;
@@ -64,9 +70,12 @@
 		this.port = port;
 	}
 	
-	public REPCommand clone(){
-		REPCommand command = new REPCommand(cmd, sid, eid, seq, lineno, textsiz, new String(string));
-		return command;
+	public void setThroughMaster(boolean f){
+		this.throughMaster=f;
+	}
+	public void setSEQID(int i) {
+		// TODO Auto-generated method stub
+		seq = i;
 	}
 
 }