view rep/REPCommand.java @ 339:bb9e202af4d8

*** empty log message ***
author kono
date Sun, 12 Oct 2008 19:51:53 +0900
parents 90965a3bd4f3
children f55843e829d6
line wrap: on
line source

package rep;

import rep.REP;

public class REPCommand {
	public static REPCommand SMCMD_SESSION_JOIN = new REPCommand(REP.SMCMD_SM_JOIN, 0, 0, 0, 0, "");
	public REP cmd;
	public int sid;
	public int eid;
	public int seq;
	public int len;
	public int lineno;
	public boolean stat;
	public boolean throughMaster;

	public  String string;
	String host;
	String port;
	
	public REPCommand(REP cmd,int sid,int eid, int seq, int lineno, String string) {
		this.cmd = cmd;
		this.sid = sid;
		this.eid = eid;
		this.seq = seq;
		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);
	}

	public REPCommand() {
		// TODO Auto-generated constructor stub
	}
	public REPCommand(int cmd, int sid, int eid, int seq, int lineno,
			int textsiz, String string) {
		this.cmd = REP.newREP(cmd);
		this.sid = sid;
		this.eid = eid;
		this.seq = seq;
		this.lineno = lineno;
		this.string = string;
		this.throughMaster = false;
	}
	
	public String toString(){
		String repCmdString = cmd + ",sid=" + sid + ",eid=" + eid + ",seq=" + seq +
				",lineno=" + lineno + ",sz=" + string.length() + "," + string;
		return repCmdString;
	}

	public void setEID(int eid2) {
		this.eid = eid2;
	}

	public void setCMD(REP cmd2) {
		this.cmd = cmd2;
	}

	public void setSID(int sessionID) {
		this.sid = sessionID;
	}

	public void setString(String string2) {
		string = string2;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public void setPort(String port) {
		this.port = port;
	}
	
	public void setThroughMaster(boolean f){
		this.throughMaster=f;
	}
	public void setSEQID(int i) {
		seq = i;
	}

}