Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/EditorPlus.java @ 319:dfed28488274
*** empty log message ***
author | kono |
---|---|
date | Thu, 09 Oct 2008 17:26:55 +0900 |
parents | 291c62984ba0 |
children | e235998427a6 |
line wrap: on
line diff
--- a/rep/EditorPlus.java Wed Oct 08 10:09:02 2008 +0900 +++ b/rep/EditorPlus.java Thu Oct 09 17:26:55 2008 +0900 @@ -2,22 +2,65 @@ import rep.channel.REPSocketChannel; -public class EditorPlus<P> { +public class EditorPlus { - private int eid; - private REPSocketChannel<P> channel; - public EditorPlus(int eid, REPSocketChannel<P> channel) { + public int eid; // unique in a session, eid==0 master + public int sid=-1; // globally unique + public String host; + public String file; + public REPSocketChannel<REPCommand> channel; + + public EditorPlus() { + + } + + public EditorPlus(int eid, REPSocketChannel<REPCommand> channel) { this.eid = eid; this.channel = channel; } + + public String getName() { + return file; + } + + public void setName(String string) { + file = string; + } + + + public void setSID(int sid) { + this.sid = sid; + } + + public int getSID() { + return sid; + } + public String toString(){ return ("Editor:" + eid); } + + public void setEID(int eid) { + this.eid = eid; + } + public int getEID(){ return eid; } - public REPSocketChannel<P> getChannel(){ + + public void setHost(String host){ + this.host = host; + } + + + public String getHost(){ + return host; + } + public REPSocketChannel<REPCommand> getChannel(){ return channel; } + public void setChannel(REPSocketChannel<REPCommand> channel) { + this.channel = channel; + } }