HomeSort by relevance Sort by last modified time
    Searched full:selectionkey (Results 1 - 25 of 40) sorted by null

1 2

  /libcore/harmony-tests/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/
SelectionKeyTest.java 24 import java.nio.channels.SelectionKey;
32 * Tests for SelectionKey and its default implementation
40 SelectionKey selectionKey;
49 selectionKey = sc.register(selector, SelectionKey.OP_CONNECT);
53 selectionKey.cancel();
54 selectionKey = null;
60 static class MockSelectionKey extends SelectionKey {
79 public SelectionKey interestOps(int operations)
    [all...]
UnixSelectorTest.java 22 import java.nio.channels.SelectionKey;
65 SelectionKey mkey0 = server.serverChannel.register(sel0, SelectionKey.OP_ACCEPT);
66 server.serverChannel.register(sel1, SelectionKey.OP_ACCEPT);
79 socketChannel.register(sel2, SelectionKey.OP_WRITE);
96 SelectionKey mkey3 = socketChannel2.register(sel3, SelectionKey.OP_WRITE);
105 SelectionKey mkey4 = socketChannel2.register(sel4, SelectionKey.OP_CONNECT);
111 SelectionKey mkey5 = socketChannel2.register(sel5, SelectionKey.OP_CONNECT | SelectionKey.OP_WRITE)
    [all...]
SelectorTest.java 26 import java.nio.channels.SelectionKey;
105 SelectionKey key = ssc.register(selector, SelectionKey.OP_ACCEPT);
107 Set<SelectionKey> keySet = selector.keys();
108 Set<SelectionKey> keySet2 = selector.keys();
112 SelectionKey key2 = keySet.iterator().next();
118 SelectionKey key3 = sc.register(selector, SelectionKey.OP_READ);
152 ssc.register(selector, SelectionKey.OP_ACCEPT);
158 Set<SelectionKey> selectedKeys = selector.selectedKeys()
    [all...]
SelectableChannelTest.java 22 import java.nio.channels.SelectionKey;
40 msc.register(Selector.open(), SelectionKey.OP_ACCEPT);
65 public SelectionKey keyFor(Selector sel) {
73 public SelectionKey register(Selector sel, int ops, Object att)
  /libcore/harmony-tests/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/spi/
AbstractSelectableChannelTest.java 24 import java.nio.channels.SelectionKey;
114 SelectionKey acceptKey = sc.register(acceptSelector1,
115 SelectionKey.OP_READ, null);
121 acceptKey = sc.register(acceptSelector2, SelectionKey.OP_READ, null);
146 //different SelectionKey with validOps
147 msc.register(acceptSelector, SelectionKey.OP_READ, null);
161 msc.register(acceptSelector, SelectionKey.OP_READ, null);
183 msc.register(acceptSelector, SelectionKey.OP_READ, null);
197 msc.register(acceptSelector, SelectionKey.OP_READ, null);
214 sc.register(null, SelectionKey.OP_READ, argObj)
    [all...]
MockAbstractSelector.java 20 import java.nio.channels.SelectionKey;
48 protected SelectionKey register(AbstractSelectableChannel arg0, int arg1,
65 public Set<SelectionKey> keys() {
69 public Set<SelectionKey> selectedKeys() {
AbstractSelectorTest.java 21 import java.nio.channels.SelectionKey;
119 SelectionKey acceptKey = ssc.register(acceptSelector,
120 SelectionKey.OP_ACCEPT);
137 ssc.register(acceptSelector, SelectionKey.OP_ACCEPT);
147 ssc.register(acceptSelector, SelectionKey.OP_ACCEPT);
154 SelectionKey acceptKey = ssc.register(acceptSelector,
155 SelectionKey.OP_ACCEPT);
AbstractSelectionKeyTest.java 20 import java.nio.channels.SelectionKey;
68 public SelectionKey interestOps(int arg0) {
  /libcore/luni/src/test/java/libcore/java/nio/channels/
SelectorTest.java 23 import java.nio.channels.SelectionKey;
46 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
48 assertEquals(SelectionKey.OP_CONNECT, key.readyOps());
64 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
66 assertEquals(SelectionKey.OP_CONNECT, key.readyOps());
164 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE)
    [all...]
SocketChannelTest.java 26 import java.nio.channels.SelectionKey;
71 SelectionKey selectionKey = sc.register(selector, SelectionKey.OP_CONNECT);
OldSocketChannelTest.java 31 import java.nio.channels.SelectionKey;
175 assertEquals((SelectionKey.OP_CONNECT | SelectionKey.OP_READ |
176 SelectionKey.OP_WRITE), this.channel1.validOps());
  /external/smack/src/org/xbill/DNS/
Client.java 13 protected SelectionKey key;
23 key = channel.register(selector, SelectionKey.OP_READ);
35 blockUntil(SelectionKey key, long endTime) throws IOException {
TCPClient.java 28 key.interestOps(SelectionKey.OP_CONNECT);
52 key.interestOps(SelectionKey.OP_WRITE);
79 key.interestOps(SelectionKey.OP_READ);
  /libcore/luni/src/main/java/java/nio/channels/spi/
AbstractSelector.java 21 import java.nio.channels.SelectionKey;
38 private final Set<SelectionKey> cancelledKeysSet = new HashSet<SelectionKey>();
86 protected final Set<SelectionKey> cancelledKeys() {
93 * @param operations the {@link SelectionKey interest set} of {@code
98 protected abstract SelectionKey register(AbstractSelectableChannel channel,
126 void cancel(SelectionKey key) {
AbstractSelectableChannel.java 26 import java.nio.channels.SelectionKey;
43 private List<SelectionKey> keyList = new ArrayList<SelectionKey>();
90 synchronized public final SelectionKey keyFor(Selector selector) {
91 for (SelectionKey key : keyList) {
102 * {@link SelectionKey interest set} is updated to {@code interestSet} and
110 * this channel's {@link SelectionKey interest set}.
127 public final SelectionKey register(Selector selector, int interestSet,
148 SelectionKey key = keyFor(selector);
175 for (SelectionKey key : keyList)
    [all...]
AbstractSelectionKey.java 19 import java.nio.channels.SelectionKey;
25 public abstract class AbstractSelectionKey extends SelectionKey {
  /libcore/luni/src/main/java/java/nio/
SelectorImpl.java 23 import java.nio.channels.SelectionKey;
24 import static java.nio.channels.SelectionKey.*;
62 private final Set<SelectionKey> unmodifiableKeys = Collections
63 .<SelectionKey>unmodifiableSet(mutableKeys);
65 private final Set<SelectionKey> mutableSelectedKeys = new HashSet<SelectionKey>();
71 private final Set<SelectionKey> selectedKeys
72 = new UnaddableSet<SelectionKey>(mutableSelectedKeys);
111 for (SelectionKey sk : mutableKeys) {
119 @Override protected SelectionKey register(AbstractSelectableChannel channel
    [all...]
SelectionKeyImpl.java 21 import java.nio.channels.SelectionKey;
28 * Default implementation of SelectionKey
68 public SelectionKey interestOps(int operations) {
  /libcore/luni/src/main/java/java/nio/channels/
SelectableChannel.java 26 * which return a {@link SelectionKey} object. In order to deregister a channel
28 * explicitly by calling the {@link SelectionKey#cancel()} method but it is also
98 public abstract SelectionKey keyFor(Selector sel);
111 * {@link SelectionKey interest set} is updated to {@code operations}. The
127 * this channel's {@link SelectionKey interest set}.
141 public final SelectionKey register(Selector selector, int operations)
150 * but its {@link SelectionKey interest set} is updated to {@code ops} and
163 * this channel's {@link SelectionKey interest set}.
179 public abstract SelectionKey register(Selector sel, int ops, Object att)
183 * Gets the set of valid {@link SelectionKey operations} of this channel
    [all...]
Selector.java 27 * {@link SelectionKey} that represents the registration. The keys are also
35 * their {@link SelectionKey interest set}.
86 public abstract Set<SelectionKey> keys();
97 * according to its {@link SelectionKey interest set}. This method does not
111 * according to its {@link SelectionKey interest set}. This method does not
138 public abstract Set<SelectionKey> selectedKeys();
142 * according to its {@link SelectionKey interest set}. This operation will
SelectionKey.java 20 * A {@code SelectionKey} represents the relationship between a channel and a
34 public abstract class SelectionKey {
59 * Constructs a new {@code SelectionKey}.
61 protected SelectionKey() {
113 * Gets this key's {@link SelectionKey interest set}. The returned set has
123 * Sets the {@link SelectionKey interest set} for this key.
135 public abstract SelectionKey interestOps(int operations);
Pipe.java 52 return SelectionKey.OP_WRITE;
78 return SelectionKey.OP_READ;
  /external/jmonkeyengine/engine/src/networking/com/jme3/network/kernel/tcp/
SelectorKernel.java 233 private Map<NioEndpoint,SelectionKey> endpointKeys = new ConcurrentHashMap<NioEndpoint,SelectionKey>();
255 serverChannel.register(selector, SelectionKey.OP_ACCEPT);
293 for( Map.Entry<NioEndpoint,SelectionKey> e : endpointKeys.entrySet() ) {
295 e.getValue().interestOps(SelectionKey.OP_WRITE);
300 protected void accept( SelectionKey key ) throws IOException
316 SelectionKey endKey = remoteChan.register( selector, SelectionKey.OP_READ );
326 SelectionKey key = endpointKeys.remove(p);
344 protected void cancel( SelectionKey key, SocketChannel c ) throws IOExceptio
    [all...]
  /external/mp4parser/isoparser/src/main/java/com/coremedia/iso/
ChannelHelper.java 23 import java.nio.channels.SelectionKey;
80 public static void close(SelectionKey key) {
  /libcore/luni/src/main/java/libcore/io/
StructPollfd.java 41 * FileDescriptor with the corresponding SelectionKey.

Completed in 1361 milliseconds

1 2