Mercurial > hg > RemoteEditor > REPSessionManager
changeset 219:13e0520470dc
*** empty log message ***
author | kono |
---|---|
date | Sun, 31 Aug 2008 10:59:34 +0900 |
parents | 827c439d0da4 |
children | 216d64cd5f3a |
files | rep/channel/REPSelectionKey.java rep/channel/REPSelector.java |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/REPSelectionKey.java Sun Aug 31 07:53:28 2008 +0900 +++ b/rep/channel/REPSelectionKey.java Sun Aug 31 10:59:34 2008 +0900 @@ -10,9 +10,11 @@ public class REPSelectionKey<P> extends SelectionKey { SelectionKey key; + private REPSelector<P> selector; - public REPSelectionKey(SelectionKey key) { + public REPSelectionKey(SelectionKey key,REPSelector<P>s) { this.key = key; + this.selector = s; attach(key.attachment()); } @@ -75,8 +77,7 @@ @Override public Selector selector() { - assert(false); - return key.selector(); // should return REPSelector + return selector; } @SuppressWarnings("unchecked")
--- a/rep/channel/REPSelector.java Sun Aug 31 07:53:28 2008 +0900 +++ b/rep/channel/REPSelector.java Sun Aug 31 10:59:34 2008 +0900 @@ -79,7 +79,7 @@ Set<SelectionKey> keys = selector.selectedKeys(); HashSet<REPSelectionKey<P>> newKeys = new HashSet<REPSelectionKey<P>>(); for(SelectionKey k: keys) { - newKeys.add(new REPSelectionKey<P>(k)); + newKeys.add(new REPSelectionKey<P>(k,this)); } return newKeys; }