public final SelectionKey keyFor() { return channel.keyFor(selector); }
protected boolean isReadable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isReadable(); }
protected boolean isWritable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isWritable(); }
protected boolean isReadable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isReadable(); }
@Override protected boolean isWritable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isWritable(); }
@Override protected boolean isReadable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isReadable(); }
protected boolean isWritable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isWritable(); }
@Override protected boolean isReadable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isReadable(); }
@Override protected boolean isWritable(DatagramChannel handle) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return false; } return key.isWritable(); }
protected NioSession newSession(IoProcessor<NioSession> processor, DatagramChannel handle, SocketAddress remoteAddress) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return null; } NioDatagramSession newSession = new NioDatagramSession(this, handle, processor, remoteAddress); newSession.setSelectionKey(key); return newSession; }
@Override protected void close(DatagramChannel handle) throws Exception { SelectionKey key = handle.keyFor(selector); if (key != null) { key.cancel(); } handle.disconnect(); handle.close(); }
protected void close(DatagramChannel handle) throws Exception { SelectionKey key = handle.keyFor(selector); if (key != null) { key.cancel(); } handle.disconnect(); handle.close(); }
protected void close(DatagramChannel handle) throws Exception { SelectionKey key = handle.keyFor(selector); if (key != null) { key.cancel(); } handle.disconnect(); handle.close(); }
@Override protected void close(DatagramChannel handle) throws Exception { SelectionKey key = handle.keyFor(selector); if (key != null) { key.cancel(); } handle.disconnect(); handle.close(); }
@Override protected NioSession newSession( IoProcessor<NioSession> processor, DatagramChannel handle, SocketAddress remoteAddress) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return null; } NioDatagramSession newSession = new NioDatagramSession( this, handle, processor, remoteAddress); newSession.setSelectionKey(key); return newSession; }
protected NioSession newSession(IoProcessor<NioSession> processor, DatagramChannel handle, SocketAddress remoteAddress) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return null; } NioDatagramSession newSession = new NioDatagramSession(this, handle, processor, remoteAddress); newSession.setSelectionKey(key); return newSession; }
@Override protected NioSession newSession( IoProcessor<NioSession> processor, DatagramChannel handle, SocketAddress remoteAddress) { SelectionKey key = handle.keyFor(selector); if ((key == null) || (!key.isValid())) { return null; } NioDatagramSessionEx newSession = new NioDatagramSessionEx( this, handle, processor, remoteAddress); newSession.setSelectionKey(key); return newSession; }
/** * {@inheritDoc} */ public void writeToAsyncQueue(ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler, AsyncQueueDataProcessor writePreProcessor, boolean isCloneByteBuffer) throws IOException { selectorHandler.getAsyncQueueWriter().write( datagramChannel.keyFor(selectorHandler.getSelector()), buffer, callbackHandler, writePreProcessor, isCloneByteBuffer); }
/** * {@inheritDoc} */ public void readFromAsyncQueue(ByteBuffer buffer, AsyncReadCallbackHandler callbackHandler, AsyncReadCondition condition, AsyncQueueDataProcessor readPostProcessor) throws IOException { selectorHandler.getAsyncQueueReader().read( datagramChannel.keyFor(selectorHandler.getSelector()), buffer, callbackHandler, condition, readPostProcessor); }
/** * {@inheritDoc} */ public void writeToAsyncQueue(SocketAddress dstAddress, ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler, AsyncQueueDataProcessor writePreProcessor, boolean isCloneByteBuffer) throws IOException { selectorHandler.getAsyncQueueWriter().write( datagramChannel.keyFor(selectorHandler.getSelector()), dstAddress, buffer, callbackHandler, writePreProcessor, isCloneByteBuffer); }