/openjdk7/jdk/test/java/nio/channels/SocketChannel/ |
H A D | Trivial.java | 40 SelectionKey sk = sc.register(sel, SelectionKey.OP_READ, args); 41 if (sc.keyFor(sel) != sk) 43 if (sk.attachment() != args) 44 throw new Exception("attachment() returned " + sk.attachment()); 46 sk.attach(t); 47 if (sk.attachment() != t) 49 sk.isReadable(); 50 sk.isWritable(); 51 sk.isConnectable(); 52 sk [all...] |
H A D | Close.java | 42 static void check(SelectionKey sk) throws IOException { argument 43 if (sk.isValid()) 45 if (sk.channel().isOpen()) 47 // if (!((SocketChannel)sk.channel()).socket().isClosed()) 52 SelectionKey sk = open(); 53 //((SocketChannel)sk.channel()).socket().close(); 54 check(sk); 58 SelectionKey sk = open(); 60 sk.channel().close(); 61 check(sk); [all...] |
H A D | Connect.java | 57 SelectionKey sk; 64 sk = sc.register(selector, SelectionKey.OP_CONNECT); 86 else if(!selectedKeys.contains(sk)) 91 if(sk.isConnectable()) { 95 sk.interestOps(SelectionKey.OP_WRITE); 106 if(sk.isWritable() && (buf.remaining() > 0)) {
|
H A D | Hangup.java | 54 static void doSelect(Selector sel, SelectionKey sk, int count) argument 64 if (!sks.remove(sk)) 110 SelectionKey sk = sv.register(sel, SelectionKey.OP_READ); 125 doSelect(sel, sk, ++ns); 139 doSelect(sel, sk, ++ns); 152 doSelect(sel, sk, ++ns); 153 doSelect(sel, sk, ++ns);
|
/openjdk7/jdk/src/share/sample/nio/server/ |
H A D | Handler.java | 52 void handle(SelectionKey sk) throws IOException; argument
|
H A D | Dispatcher1.java | 76 SelectionKey sk = (SelectionKey)i.next(); 78 Handler h = (Handler)sk.attachment(); 79 h.handle(sk);
|
H A D | DispatcherN.java | 77 SelectionKey sk = (SelectionKey)i.next(); 79 Handler h = (Handler)sk.attachment(); 80 h.handle(sk);
|
H A D | AcceptHandler.java | 66 public void handle(SelectionKey sk) throws IOException { argument 68 if (!sk.isAcceptable())
|
H A D | RequestHandler.java | 81 private boolean receive(SelectionKey sk) throws IOException { argument 88 if (!cio.doHandshake(sk)) { 125 public void handle(SelectionKey sk) throws IOException { argument 129 if (!receive(sk)) 144 sk.interestOps(SelectionKey.OP_WRITE);
|
/openjdk7/jdk/src/share/classes/sun/nio/ch/ |
H A D | SelChImpl.java | 49 * @return true iff the new value of sk.readyOps() set by this method 53 public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk); argument 59 * @return true iff the new value of sk.readyOps() set by this method 63 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk); argument 65 void translateAndSetInterestOps(int ops, SelectionKeyImpl sk); argument
|
H A D | AbstractPollSelectorImpl.java | 70 void putEventOps(SelectionKeyImpl sk, int ops) { argument 74 pollWrapper.putEventOps(sk.getIndex(), ops); 122 SelectionKeyImpl sk = channelArray[i]; 124 if (selectedKeys.contains(sk)) { 125 if (sk.channel.translateAndSetReadyOps(rOps, sk)) { 129 sk.channel.translateAndSetReadyOps(rOps, sk); 130 if ((sk.nioReadyOps() & sk [all...] |
H A D | ServerSocketChannelImpl.java | 307 SelectionKeyImpl sk) { 308 int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes 309 int oldOps = sk.nioReadyOps(); 322 sk.nioReadyOps(newOps); 330 sk.nioReadyOps(newOps); 334 public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) { argument 335 return translateReadyOps(ops, sk.nioReadyOps(), sk); 338 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { argument 339 return translateReadyOps(ops, 0, sk); 306 translateReadyOps(int ops, int initialOps, SelectionKeyImpl sk) argument 345 translateAndSetInterestOps(int ops, SelectionKeyImpl sk) argument [all...] |
/openjdk7/jdk/src/windows/classes/sun/nio/ch/ |
H A D | SinkChannelImpl.java | 76 SelectionKeyImpl sk) { 77 int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes 78 int oldOps = sk.nioReadyOps(); 87 sk.nioReadyOps(newOps); 95 sk.nioReadyOps(newOps); 99 public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) { argument 100 return translateReadyOps(ops, sk.nioReadyOps(), sk); 103 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { argument 104 return translateReadyOps(ops, 0, sk); 75 translateReadyOps(int ops, int initialOps, SelectionKeyImpl sk) argument 107 translateAndSetInterestOps(int ops, SelectionKeyImpl sk) argument [all...] |
H A D | SourceChannelImpl.java | 75 SelectionKeyImpl sk) { 76 int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes 77 int oldOps = sk.nioReadyOps(); 86 sk.nioReadyOps(newOps); 94 sk.nioReadyOps(newOps); 98 public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) { argument 99 return translateReadyOps(ops, sk.nioReadyOps(), sk); 102 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { argument 103 return translateReadyOps(ops, 0, sk); 74 translateReadyOps(int ops, int initialOps, SelectionKeyImpl sk) argument 106 translateAndSetInterestOps(int ops, SelectionKeyImpl sk) argument [all...] |
H A D | WindowsSelectorImpl.java | 355 SelectionKeyImpl sk = me.ski; 361 (sk.channel() instanceof SocketChannelImpl) && 367 if (selectedKeys.contains(sk)) { // Key in selected set 369 if (sk.channel.translateAndSetReadyOps(rOps, sk) && 375 if (sk.channel.translateAndUpdateReadyOps(rOps, sk) && 384 sk.channel.translateAndSetReadyOps(rOps, sk); 385 if ((sk 591 putEventOps(SelectionKeyImpl sk, int ops) argument [all...] |
/openjdk7/jdk/test/com/sun/crypto/provider/Cipher/PBE/ |
H A D | PBEKeysAlgorithmNames.java | 62 SecretKey sk = skf.generateSecret(pbeks); 63 if (!sk.getAlgorithm().equalsIgnoreCase(s)) { 65 sk.getAlgorithm() + "\" != \"" + s + "\""); 69 SecretKey sk1 = skf.translateKey(sk); 72 sk.getAlgorithm() + "\" != \"" + s + "\""); 76 KeySpec ks = skf.getKeySpec(sk, PBEKeySpec.class);
|
/openjdk7/jdk/src/solaris/classes/sun/nio/ch/ |
H A D | SinkChannelImpl.java | 116 SelectionKeyImpl sk) { 117 int intOps = sk.nioInterestOps();// Do this just once, it synchronizes 118 int oldOps = sk.nioReadyOps(); 127 sk.nioReadyOps(newOps); 135 sk.nioReadyOps(newOps); 139 public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) { argument 140 return translateReadyOps(ops, sk.nioReadyOps(), sk); 143 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { argument 144 return translateReadyOps(ops, 0, sk); 115 translateReadyOps(int ops, int initialOps, SelectionKeyImpl sk) argument 147 translateAndSetInterestOps(int ops, SelectionKeyImpl sk) argument [all...] |
H A D | SourceChannelImpl.java | 116 SelectionKeyImpl sk) { 117 int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes 118 int oldOps = sk.nioReadyOps(); 127 sk.nioReadyOps(newOps); 135 sk.nioReadyOps(newOps); 139 public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) { argument 140 return translateReadyOps(ops, sk.nioReadyOps(), sk); 143 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { argument 144 return translateReadyOps(ops, 0, sk); 115 translateReadyOps(int ops, int initialOps, SelectionKeyImpl sk) argument 147 translateAndSetInterestOps(int ops, SelectionKeyImpl sk) argument [all...] |
/openjdk7/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/ |
H A D | StateTest.java | 57 SelectionKey sk; 64 sk = ssc.register(sel, SelectionKey.OP_ACCEPT); 70 if (sk.isAcceptable() && ((sc = ssc.accept()) != null)) { 74 sel.selectedKeys().remove(sk); 80 sk.cancel(); 87 sk = sc.register(sel, SelectionKey.OP_READ); 93 if (sk.isReadable()) { 102 sel.selectedKeys().remove(sk); 108 sk.cancel();
|
H A D | CloseTest.java | 64 SelectionKey sk = sc.register(sel, SelectionKey.OP_READ); 70 if (sk.isReadable()) { 78 sel.selectedKeys().remove(sk);
|
/openjdk7/jdk/test/java/nio/channels/Selector/ |
H A D | ConnectWrite.java | 61 SelectionKey sk = (SelectionKey)i.next(); 62 readyKeys.remove(sk); 63 SocketChannel nextReady = (SocketChannel)sk.channel(); 77 SelectionKey sk = (SelectionKey)i.next(); 78 if (!sk.isWritable())
|
H A D | CheckLocking.java | 60 SelectionKey sk = sc.register(selector,0,null); 62 sk.interestOps(SelectionKey.OP_READ);
|
H A D | SelectAndCancel.java | 34 static SelectionKey sk; field in class:SelectAndCancel 53 sk = ssc.register(selector, SelectionKey.OP_ACCEPT); 72 sk.cancel();
|
/openjdk7/langtools/test/tools/javap/ |
H A D | TestSuperclass.java | 85 for (SuperKind sk: SuperKind.values()) { 86 errors += new TestSuperclass(ck, gk, sk).run(comp, fm); 97 final SuperKind sk; field in class:TestSuperclass 99 TestSuperclass(ClassKind ck, GenericKind gk, SuperKind sk) { argument 102 this.sk = sk; 106 System.err.println("test: ck:" + ck + " gk:" + gk + " sk:" + sk); 107 File testDir = new File(ck + "-" + gk + "-" + sk); 168 .replace("#EK", sk [all...] |
/openjdk7/jdk/test/com/sun/nio/sctp/SctpChannel/ |
H A D | CommUp.java | 120 SelectionKey sk = i.next(); 123 (SctpChannel)sk.channel(); 126 if (sk.isConnectable()) { 134 check(!sk.isAcceptable(), 136 check(!sk.isReadable(), 138 check(!sk.isWritable(), 143 check((sk.interestOps() & OP_CONNECT) == OP_CONNECT, 145 sk.interestOps(OP_READ); 146 check((sk.interestOps() & OP_CONNECT) != OP_CONNECT, 151 else if (sk [all...] |