@Override public NioChannel acceptChannel(AsynchronousServerSocketChannel listener) throws IOException { try { return new NioChannel(listener.accept().get()); } catch (Exception e) { throw new IOException(e); } } }
/** * Opens an asynchronous socket channel. * * <p> * The new channel is created by invoking the * {@link AsynchronousChannelProvider#openAsynchronousSocketChannel * openAsynchronousSocketChannel} method on the * {@link AsynchronousChannelProvider} that created the group. If the group * parameter is {@code null} then the resulting channel is created by the * system-wide default provider, and bound to the <em>default group</em>. * * @param group * The group to which the newly constructed channel should be * bound, or {@code null} for the default group * * @return A new asynchronous socket channel * * @throws ShutdownChannelGroupException * If the channel group is shutdown * @throws IOException * If an I/O error occurs */ public static NioChannel open(AsynchronousChannelGroup group) throws IOException { AsynchronousSocketChannel channel = AsynchronousSocketChannel.open(group); return new NioChannel(channel); }
socketProperties.getDirectBuffer()); channel = new NioChannel(socket, bufhandler);
socketProperties.getDirectBuffer()); channel = new NioChannel(socket, bufhandler);
socketProperties.getDirectBuffer()); channel = new NioChannel(socket, bufhandler);
socketProperties.getDirectBuffer()); channel = new NioChannel(socket, bufhandler);
socketProperties.getDirectBuffer()); channel = new NioChannel(socket, bufhandler);
channel = new SecureNioChannel(socket, bufhandler, selectorPool, this); } else { channel = new NioChannel(socket, bufhandler);