Searched refs:SelectionKey (Results 1 - 25 of 107) sorted by relevance

12345

/openjdk7/jdk/src/share/sample/nio/server/
H A DHandler.java52 void handle(SelectionKey sk) throws IOException;
H A DN1.java60 d.register(ssc, SelectionKey.OP_ACCEPT,
/openjdk7/jdk/test/java/nio/channels/Selector/
H A DCloseInvalidatesKeys.java39 SelectionKey key = ch.register(sel, SelectionKey.OP_WRITE);
H A DConnectWrite.java52 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
61 SelectionKey sk = (SelectionKey)i.next();
69 key.interestOps(SelectionKey.OP_WRITE);
77 SelectionKey sk = (SelectionKey)i.next();
H A DRacyDeregister.java30 import java.nio.channels.SelectionKey;
38 * @summary SelectionKey.interestOps does not update interest set on Windows.
70 SelectionKey key2 = accepted2.register(sel, SelectionKey.OP_READ);
71 final SelectionKey[] key = new SelectionKey[]{
72 accepted.register(sel, SelectionKey.OP_READ)};
85 key[0].interestOps(SelectionKey.OP_READ
86 | SelectionKey.OP_WRITE);
140 key2 = accepted2.register(sel, SelectionKey
[all...]
H A DConnect.java61 SelectionKey RKey = sc.register (RSelector, SelectionKey.OP_CONNECT);
65 Set<SelectionKey> readyKeys = RSelector.selectedKeys();
66 Iterator<SelectionKey> i = readyKeys.iterator();
68 SelectionKey sk = i.next();
H A DOpRead.java55 SelectionKey key = sc.register(selector, SelectionKey.OP_READ |
56 SelectionKey.OP_WRITE);
65 Set<SelectionKey> keys = selector.selectedKeys();
66 Iterator<SelectionKey> iterator = keys.iterator();
H A DClose.java39 SelectionKey sk = sc.register(sa, SelectionKey.OP_READ);
40 sc.register(sb, SelectionKey.OP_READ);
H A DAlias.java63 SelectionKey key = sc.register(selector,
64 SelectionKey.OP_CONNECT);
71 SelectionKey sk = (SelectionKey)i.next();
H A DCheckLocking.java60 SelectionKey sk = sc.register(selector,0,null);
62 sk.interestOps(SelectionKey.OP_READ);
/openjdk7/jdk/src/share/classes/java/nio/channels/
H A DSelectionKey.java110 public abstract class SelectionKey { class
115 protected SelectionKey() { } method in class:SelectionKey
199 public abstract SelectionKey interestOps(int ops);
368 private static final AtomicReferenceFieldUpdater<SelectionKey,Object>
370 SelectionKey.class, Object.class, "attachment"
H A DSelectableChannel.java38 * register} method. This method returns a new {@link SelectionKey} object
49 * SelectionKey#cancel() cancel} method. All of a channel's keys are cancelled
88 * @see SelectionKey
110 * Returns an <a href="SelectionKey.html#opsets">operation set</a>
149 public abstract SelectionKey keyFor(Selector sel);
160 * the {@link SelectionKey#interestOps(int) interestOps(int)} method. If
216 public abstract SelectionKey register(Selector sel, int ops, Object att)
274 public final SelectionKey register(Selector sel, int ops)
H A DPipe.java76 * returns {@link SelectionKey#OP_READ}. </p>
81 return SelectionKey.OP_READ;
107 * {@link SelectionKey#OP_WRITE}. </p>
112 return SelectionKey.OP_WRITE;
H A DSelector.java48 * {@link SelectionKey} object. A selector maintains three sets of selection
78 * whether by closing its channel or by invoking its {@link SelectionKey#cancel
203 * @see SelectionKey
259 public abstract Set<SelectionKey> keys();
275 public abstract Set<SelectionKey> selectedKeys();
/openjdk7/jdk/test/java/nio/channels/SocketChannel/
H A DClose.java35 static SelectionKey open() throws IOException {
39 return sc.register(sel, SelectionKey.OP_READ);
42 static void check(SelectionKey sk) throws IOException {
52 SelectionKey sk = open();
58 SelectionKey sk = open();
H A DIsConnectable.java47 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
57 Set<SelectionKey> sel = selector.selectedKeys();
58 Iterator<SelectionKey> i = sel.iterator();
59 SelectionKey sk = i.next();
/openjdk7/corba/src/share/classes/com/sun/corba/se/pept/transport/
H A DEventHandler.java29 import java.nio.channels.SelectionKey;
47 public void setSelectionKey(SelectionKey selectionKey);
48 public SelectionKey getSelectionKey();
/openjdk7/jdk/test/sun/security/ssl/sun/net/www/httpstest/
H A DClosedChannelList.java34 SelectionKey key;
35 Element (long l, SelectionKey key) {
49 public synchronized void add (SelectionKey key) {
68 SelectionKey k = elm.key;
/openjdk7/jdk/test/sun/net/www/httptest/
H A DClosedChannelList.java34 SelectionKey key;
35 Element (long l, SelectionKey key) {
49 public synchronized void add (SelectionKey key) {
68 SelectionKey k = elm.key;
/openjdk7/jdk/src/share/classes/java/nio/channels/spi/
H A DAbstractSelector.java29 import java.nio.channels.SelectionKey;
85 private final Set<SelectionKey> cancelledKeys = new HashSet<SelectionKey>();
87 void cancel(SelectionKey k) { // package-private
149 protected final Set<SelectionKey> cancelledKeys() {
172 protected abstract SelectionKey register(AbstractSelectableChannel ch,
H A DAbstractSelectableChannel.java61 private SelectionKey[] keys = null;
92 private void addKey(SelectionKey k) {
101 keys = new SelectionKey[3];
105 SelectionKey[] ks = new SelectionKey[n];
115 private SelectionKey findKey(Selector sel) {
126 void removeKey(SelectionKey k) { // package-private
158 public final SelectionKey keyFor(Selector sel) {
188 public final SelectionKey register(Selector sel, int ops,
199 SelectionKey
[all...]
H A DAbstractSelectionKey.java42 extends SelectionKey
/openjdk7/jdk/src/share/classes/sun/nio/ch/
H A DSelectorImpl.java45 protected Set<SelectionKey> selectedKeys;
48 protected HashSet<SelectionKey> keys;
51 private Set<SelectionKey> publicKeys; // Immutable
52 private Set<SelectionKey> publicSelectedKeys; // Removal allowed, but not addition
56 keys = new HashSet<SelectionKey>();
57 selectedKeys = new HashSet<SelectionKey>();
67 public Set<SelectionKey> keys() {
73 public Set<SelectionKey> selectedKeys() {
124 protected final SelectionKey register(AbstractSelectableChannel ch,
/openjdk7/jdk/test/java/nio/channels/Pipe/
H A DSelectPipe.java52 SelectionKey readkey = source.register(selector, SelectionKey.OP_READ);
53 SelectionKey writekey = sink.register(selector, SelectionKey.OP_WRITE);
/openjdk7/jdk/test/java/nio/channels/SelectionKey/
H A DRacyRegister.java26 * @summary Test that register does not return a valid SelectionKey when
54 SelectionKey key = null;
56 key = sc.register(sel, SelectionKey.OP_READ);

Completed in 69 milliseconds

12345