# HG changeset patch # User kono # Date 1219827489 -32400 # Node ID 291c62984ba0a2a8d3b75cb26d095aac9aff5569 # Parent 9faacdd6c9cb2edd3886b86d48814fbf20a5271f *** empty log message *** diff -r 9faacdd6c9cb -r 291c62984ba0 rep/EditorPlus.java --- a/rep/EditorPlus.java Wed Aug 27 17:54:47 2008 +0900 +++ b/rep/EditorPlus.java Wed Aug 27 17:58:09 2008 +0900 @@ -1,12 +1,12 @@ package rep; -import java.nio.channels.SocketChannel; +import rep.channel.REPSocketChannel; -public class EditorPlus { +public class EditorPlus
{ private int eid; - private SocketChannel channel; - public EditorPlus(int eid, SocketChannel channel) { + private REPSocketChannel
channel; + public EditorPlus(int eid, REPSocketChannel
channel) { this.eid = eid; this.channel = channel; } @@ -16,7 +16,7 @@ public int getEID(){ return eid; } - public SocketChannel getChannel(){ + public REPSocketChannel
getChannel(){ return channel; } diff -r 9faacdd6c9cb -r 291c62984ba0 rep/REPActionEvent.java --- a/rep/REPActionEvent.java Wed Aug 27 17:54:47 2008 +0900 +++ b/rep/REPActionEvent.java Wed Aug 27 17:58:09 2008 +0900 @@ -1,32 +1,28 @@ package rep; -import java.nio.channels.SocketChannel; +import rep.channel.REPSocketChannel; -public class REPActionEvent { +public class REPActionEvent
{ - private SocketChannel editorChannel; + private REPSocketChannel
editorChannel; private int sid; private int eid; - public REPActionEvent(EditorPlus plus, SessionPlus plus2) { - // TODO Auto-generated constructor stub + public REPActionEvent(EditorPlus
plus, SessionPlus plus2) { this.editorChannel = plus.getChannel(); this.eid = plus.getEID(); this.sid = plus2.getSID(); } - public SocketChannel getEditorChannel() { - // TODO Auto-generated method stub + public REPSocketChannel
getEditorChannel() { return editorChannel; } public int getSID() { - // TODO Auto-generated method stub return sid; } public int getEID() { - // TODO Auto-generated method stub return eid; } diff -r 9faacdd6c9cb -r 291c62984ba0 rep/REPActionListener.java --- a/rep/REPActionListener.java Wed Aug 27 17:54:47 2008 +0900 +++ b/rep/REPActionListener.java Wed Aug 27 17:58:09 2008 +0900 @@ -1,8 +1,8 @@ package rep; -public interface REPActionListener { +public interface REPActionListener
{ - public void ActionOccured(REPActionEvent event); + public void ActionOccured(REPActionEvent
event); public void undo(); } diff -r 9faacdd6c9cb -r 291c62984ba0 test/ConnectToSessionManager.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/ConnectToSessionManager.java Wed Aug 27 17:58:09 2008 +0900 @@ -0,0 +1,20 @@ +package test; + +import rep.REPCommand; +import rep.net.REPNet; + +public class ConnectToSessionManager { + private REPNet rnet; + + public static void main(String[] args){ + ConnectToSessionManager test = new ConnectToSessionManager(); + test.sm_join("localhost"); + } + + public void sm_join(String host){ + rnet = new REPNet(); + rnet.sm_connect(host, 8765); + rnet.send(REPCommand.SMCMD_SESSION_JOIN); + } + +}