Mercurial > hg > RemoteEditor > REPSessionManager
changeset 422:5e18919011a8
minor fix
author | one |
---|---|
date | Wed, 08 Jul 2009 11:05:33 +0900 |
parents | f8916a96a373 |
children | 0b6b838befeb |
files | rep/channel/REPSocketChannel.java rep/channel/SelectionKeySimulator.java test/sematest/TestSessionManager.java |
diffstat | 3 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/REPSocketChannel.java Sat Jun 06 14:42:40 2009 +0900 +++ b/rep/channel/REPSocketChannel.java Wed Jul 08 11:05:33 2009 +0900 @@ -154,11 +154,12 @@ public SelectionKey register1(REPSelector<P> sel, int ops, Object att) throws ClosedChannelException { - if(sel instanceof REPSelector) { - REPSelector<P> s = (REPSelector<P>)sel; - return sc.register(s.selector, ops,att); - } - return sc.register(sel, ops,att); +// if(sel instanceof REPSelector) { // should be always true... +// REPSelector<P> s = (REPSelector<P>)sel; +// return sc.register(s.selector, ops,att); + return sc.register(sel.selector, ops,att); +// } +// return sc.register(sel, ops,att); } @SuppressWarnings("unchecked")
--- a/rep/channel/SelectionKeySimulator.java Sat Jun 06 14:42:40 2009 +0900 +++ b/rep/channel/SelectionKeySimulator.java Wed Jul 08 11:05:33 2009 +0900 @@ -105,10 +105,10 @@ @Override public int readyOps() { int ops=0; - if ( channel instanceof ServerChannelSimulator ){ + if ( channel instanceof ServerChannelSimulator<?> ){ ServerChannelSimulator<?> scs = (ServerChannelSimulator<?>) channel; ops = ( OP_ACCEPT * (scs.isAcceptable()? 1:0) ); - } else if ( channel instanceof ChannelSimulator ){ + } else if ( channel instanceof ChannelSimulator<?> ){ ChannelSimulator<?> scs = (ChannelSimulator<?>) channel; ops = ( OP_READ * (scs.isReadable()? 1:0) ) | ( OP_WRITE * (scs.isWritable()? 1:0) );
--- a/test/sematest/TestSessionManager.java Sat Jun 06 14:42:40 2009 +0900 +++ b/test/sematest/TestSessionManager.java Wed Jul 08 11:05:33 2009 +0900 @@ -114,7 +114,7 @@ * isSimulation=true thread base simulation for PathFinder * isSimulation=false socket based communication mode */ - REPServerSocketChannel.isSimulation = false; + REPServerSocketChannel.isSimulation = true; // At least 3 TestEditors are required. TestSessionManager test = new TestSessionManager(1, 0, 3); logger.setLogLevel(5);