Mercurial > hg > RemoteEditor > REPSessionManager
changeset 255:cc119b4b1e96
*** empty log message ***
author | kono |
---|---|
date | Tue, 09 Sep 2008 14:58:57 +0900 |
parents | 27d78262ba5f |
children | 7dbed9d1d213 |
files | rep/channel/REPSocketChannel.java |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/REPSocketChannel.java Fri Sep 05 18:19:15 2008 +0900 +++ b/rep/channel/REPSocketChannel.java Tue Sep 09 14:58:57 2008 +0900 @@ -9,6 +9,7 @@ import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.SocketChannel; +import java.nio.channels.spi.AbstractSelector; import java.nio.channels.spi.SelectorProvider; import java.util.HashMap; @@ -68,6 +69,15 @@ public SelectionKey keyFor(Selector sel) { return sc.keyFor(sel); } + + public SelectionKey keyFor(REPSelector<?> sel) { + return sc.keyFor(sel.selector); + } + + public REPSelectionKey<P> keyFor1(REPSelector<P> sel) { + return new REPSelectionKey<P>(sc.keyFor(sel.selector), + new REPSelector<P>((AbstractSelector) sel.selector)); + } @Override public SelectorProvider provider() {