HomeSort by relevance Sort by last modified time
    Searched refs:SelectionKey (Results 1 - 25 of 54) sorted by null

1 2 3

  /libcore/luni/src/main/java/java/nio/channels/spi/
AbstractSelectionKey.java 19 import java.nio.channels.SelectionKey;
25 public abstract class AbstractSelectionKey extends SelectionKey {
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...]
  /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...]
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;
Selector.java 27 * {@link SelectionKey} that represents the registration. The keys are also
35 * their {@link SelectionKey interest set}.
89 public abstract Set<SelectionKey> keys();
100 * according to its {@link SelectionKey interest set}. This method does not
114 * according to its {@link SelectionKey interest set}. This method does not
143 public abstract Set<SelectionKey> selectedKeys();
147 * according to its {@link SelectionKey interest set}. This operation will
SocketChannel.java 126 * {@code SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE}.
133 return (SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE);
ServerSocketChannel.java 67 * SelectionKey.OP_ACCEPT}.
74 return SelectionKey.OP_ACCEPT;
DatagramChannel.java 75 * <code>SelectionKey.OP_READ</code> | <code>SelectionKey.OP_WRITE</code> ).
82 return (SelectionKey.OP_READ | SelectionKey.OP_WRITE);
  /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
SelectionKeyTest.java 24 import java.nio.channels.SelectionKey;
30 * Tests for SelectionKey and its default implementation
38 SelectionKey selectionKey;
47 selectionKey = sc.register(selector, SelectionKey.OP_CONNECT);
51 selectionKey.cancel();
52 selectionKey = null;
58 static class MockSelectionKey extends SelectionKey {
77 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/luni/src/test/java/libcore/java/nio/channels/
SelectorTest.java 23 import java.nio.channels.SelectionKey;
44 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
46 assertEquals(SelectionKey.OP_CONNECT, key.readyOps());
62 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
64 assertEquals(SelectionKey.OP_CONNECT, key.readyOps());
147 SelectionKey key = sc.register(selector,
148 SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE)
    [all...]
  /libcore/harmony-tests/src/test/java/org/apache/harmony/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/main/java/java/nio/
SelectorImpl.java 25 import java.nio.channels.SelectionKey;
45 import static java.nio.channels.SelectionKey.OP_ACCEPT;
46 import static java.nio.channels.SelectionKey.OP_CONNECT;
47 import static java.nio.channels.SelectionKey.OP_READ;
48 import static java.nio.channels.SelectionKey.OP_WRITE;
66 private final Set<SelectionKey> unmodifiableKeys = Collections
67 .<SelectionKey>unmodifiableSet(mutableKeys);
69 private final Set<SelectionKey> mutableSelectedKeys = new HashSet<SelectionKey>();
75 private final Set<SelectionKey> selectedKey
    [all...]
SelectionKeyImpl.java 21 import java.nio.channels.SelectionKey;
28 * Default implementation of SelectionKey
68 public SelectionKey interestOps(int operations) {
  /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/jetty/src/java/org/eclipse/jetty/server/nio/
NetworkTrafficSelectChannelConnector.java 22 import java.nio.channels.SelectionKey;
59 protected SelectChannelEndPoint newEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key) throws IOException
  /external/jetty/src/java/org/eclipse/jetty/io/nio/
SelectChannelEndPoint.java 25 import java.nio.channels.SelectionKey;
50 private SelectionKey _key;
56 /** The desired value for {@link SelectionKey#interestOps()} */
96 public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime)
112 public SelectionKey getSelectionKey()
184 if ((_key.readyOps() & SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE && (_key.interestOps() & SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE)
187 _interestOps = _key.interestOps() & ~SelectionKey.OP_WRITE
    [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) {

Completed in 420 milliseconds

1 2 3