Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/channel/SelectorSimulator.java @ 143:785a3e8ea858
*** empty log message ***
author | kent |
---|---|
date | Wed, 27 Aug 2008 22:48:10 +0900 |
parents | 9faacdd6c9cb |
children | 72252e970a8b |
line wrap: on
line diff
--- a/rep/channel/SelectorSimulator.java Wed Aug 27 21:31:21 2008 +0900 +++ b/rep/channel/SelectorSimulator.java Wed Aug 27 22:48:10 2008 +0900 @@ -12,7 +12,7 @@ -public class SelectorSimulator<P> extends REPSelector{ +public class SelectorSimulator extends REPSelector{ private TreeSet<SelectionKey> keyList; private TreeSet<SelectionKey> selectedKeys; @@ -45,20 +45,20 @@ return selectedKeys.size(); } - public SelectionKeySimulator register(SelectableChannelSimulator<P> cs, int opt){ + public <T> SelectionKeySimulator register(SelectableChannelSimulator<T> cs, int opt){ SelectionKeySimulator key = new SelectionKeySimulator(cs, opt, this); keyList.add(key); return key; } - - public SelectionKeySimulator register(ChannelSimulator<P> cs, int opt, Object handler){ + + public <T> SelectionKeySimulator register(ChannelSimulator<T> cs, int opt, Object handler){ SelectionKeySimulator key = new SelectionKeySimulator(cs, opt, this); key.attach(handler); keyList.add(key); return key; } - public SelectionKey getKey(ChannelSimulator<P> channel){ + public <T> SelectionKey getKey(ChannelSimulator<T> channel){ for(SelectionKey key : keyList){ if(key.channel() == channel) return key;