Lines Matching defs:key
70 * Changes the given key's interest set from one set to another and then
71 * checks the selected key set and the key's channel.
73 static void testChange(SelectionKey key, int from, int to) throws IOException {
74 Selector sel = key.selector();
78 key.interestOps(from);
83 key.interestOps(to);
93 assertTrue(k == key, "Unexpected key selected");
98 System.out.println("key readable: " + readable);
99 System.out.println("key writable: " + writable);
150 SelectionKey key = sc.register(sel, 0);
159 testChange(key, from, to);