Mercurial > hg > RemoteEditor > REPSessionManager
changeset 67:13e4c3f2c6f9
*** empty log message ***
author | pin |
---|---|
date | Fri, 16 Nov 2007 17:10:54 +0900 |
parents | 99196780bbf5 |
children | 55be16853449 |
files | rep/Session.java rep/SessionManager.java |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/Session.java Fri Nov 16 17:04:09 2007 +0900 +++ b/rep/Session.java Fri Nov 16 17:10:54 2007 +0900 @@ -13,6 +13,7 @@ private String masterPort; private LinkedList<REPNode> routingTable = new LinkedList<REPNode>(); private int incrementEID; + private boolean isOwner = false; public Session(int sessionID, String string, SocketChannel channel) { masterEditor = new Editor(sessionID, channel); @@ -58,6 +59,9 @@ routingTable.add(new REPNode(editor)); } public boolean isOwner() { - return true; + return isOwner; + } + public void setOwner(boolean b) { + isOwner = true; } }
--- a/rep/SessionManager.java Fri Nov 16 17:04:09 2007 +0900 +++ b/rep/SessionManager.java Fri Nov 16 17:10:54 2007 +0900 @@ -151,6 +151,7 @@ editor.setEID(1); editor.setName(repCmd.string); Session session = new Session(editor); + session.setOwner(true); session.addEditor(editor); sessionlist.addSession(session); sessionmanagerGUI.setComboSession(session.getSID(), session.getName());