1 7 8 package java.nio.channels; 9 10 import java.io.IOException ; 11 import java.nio.channels.spi.AbstractInterruptibleChannel ; 12 import java.nio.channels.spi.SelectorProvider ; 13 14 15 74 75 public abstract class SelectableChannel 76 extends AbstractInterruptibleChannel 77 implements Channel 78 { 79 80 83 protected SelectableChannel() { } 84 85 90 public abstract SelectorProvider provider(); 91 92 101 public abstract int validOps(); 102 103 109 120 public abstract boolean isRegistered(); 121 124 132 public abstract SelectionKey keyFor(Selector sel); 133 136 196 public abstract SelectionKey register(Selector sel, int ops, Object att) 197 throws ClosedChannelException ; 198 209 251 public final SelectionKey register(Selector sel, int ops) 252 throws ClosedChannelException 253 { 254 return register(sel, ops, null); 255 } 256 257 289 public abstract SelectableChannel configureBlocking(boolean block) 290 throws IOException ; 291 297 306 public abstract boolean isBlocking(); 307 308 317 public abstract Object blockingLock(); 318 319 } 320 | Popular Tags |