diff options
author | jfrijters <jfrijters> | 2007-07-18 09:46:37 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2007-07-18 09:46:37 +0400 |
commit | cd40d28bded0cd678d6479040f6d4a7947ec8733 (patch) | |
tree | 501e925031806a84cc47c76304e98ecb3756bf98 /openjdk/sun/nio/ch/DefaultSelectorProvider.java | |
parent | bf9dbf52fbf2ae104e7156ad42d1d1a7f230ce64 (diff) |
Implement SocketChannelImpl & DotNetSelectorImpl.
Diffstat (limited to 'openjdk/sun/nio/ch/DefaultSelectorProvider.java')
-rw-r--r-- | openjdk/sun/nio/ch/DefaultSelectorProvider.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/openjdk/sun/nio/ch/DefaultSelectorProvider.java b/openjdk/sun/nio/ch/DefaultSelectorProvider.java index b49d4a65..f50b91d5 100644 --- a/openjdk/sun/nio/ch/DefaultSelectorProvider.java +++ b/openjdk/sun/nio/ch/DefaultSelectorProvider.java @@ -25,6 +25,8 @@ package sun.nio.ch; +import java.io.IOException; +import java.nio.channels.spi.AbstractSelector; import java.nio.channels.spi.SelectorProvider; @@ -43,7 +45,24 @@ public class DefaultSelectorProvider { * Returns the default SelectorProvider. */ public static SelectorProvider create() { - throw new Error("Not implemented"); + // TODO we should instantiate SelectorProviderImpl here + return new SelectorProvider() { + public java.nio.channels.DatagramChannel openDatagramChannel() throws IOException { + throw new Error("temporary"); + } + public java.nio.channels.Pipe openPipe() throws IOException { + throw new Error("temporary"); + } + public java.nio.channels.ServerSocketChannel openServerSocketChannel() throws IOException { + throw new Error("temporary"); + } + public java.nio.channels.SocketChannel openSocketChannel() throws IOException { + return new SocketChannelImpl(this); + } + public AbstractSelector openSelector() throws IOException { + return new DotNetSelectorImpl(this); + } + }; } } |