Mercurial > hg > RemoteEditor > REPSessionManager
changeset 232:844c8f46584b
*** empty log message ***
author | kono |
---|---|
date | Sun, 31 Aug 2008 18:56:48 +0900 |
parents | b837feb00132 |
children | dae90ded1bcd |
files | rep/channel/REPSocketChannel.java |
diffstat | 1 files changed, 19 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/REPSocketChannel.java Sun Aug 31 18:50:08 2008 +0900 +++ b/rep/channel/REPSocketChannel.java Sun Aug 31 18:56:48 2008 +0900 @@ -77,18 +77,6 @@ public SelectionKey register(REPSelector<P> sel, int ops, Object att) throws ClosedChannelException { return sc.register(sel.selector, ops, att); } - @Override - public SelectionKey register(Selector sel, int ops, Object att) - throws ClosedChannelException { - if (sel instanceof REPSelector){ - return sc.register(((REPSelector<?>)sel).selector, ops); - }else if(sel instanceof Selector){ - return sc.register(sel, ops); - }else - return null; - //assert(false); - //return null; - } @Override @@ -151,6 +139,25 @@ return sc.connect(semaIP); } + 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); + } + + @SuppressWarnings("unchecked") + @Override + public SelectionKey register(Selector 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); + } } \ No newline at end of file