1 7 8 package java.nio.channels; 9 10 import java.io.IOException ; 11 import java.net.ServerSocket ; 12 import java.net.SocketAddress ; 13 import java.nio.channels.spi.*; 14 15 16 44 45 public abstract class ServerSocketChannel 46 extends AbstractSelectableChannel 47 { 48 49 52 protected ServerSocketChannel(SelectorProvider provider) { 53 super(provider); 54 } 55 56 74 public static ServerSocketChannel open() throws IOException { 75 return SelectorProvider.provider().openServerSocketChannel(); 76 } 77 78 88 public final int validOps() { 89 return SelectionKey.OP_ACCEPT; 90 } 91 92 93 95 103 public abstract ServerSocket socket(); 104 105 152 public abstract SocketChannel accept() throws IOException ; 153 154 } 155 | Popular Tags |