软件包 | 描述 |
---|---|
java.nio.channels |
定义了渠道,它代表的是能够执行I/O操作的实体连接,如文件和套接字;定义选择器,多路复用,非阻塞I/O操作。
|
java.nio.channels.spi |
为
java.nio.channels 包服务提供商类。
|
Modifier and Type | Method and Description |
---|---|
static AsynchronousChannelGroup |
AsynchronousChannelGroup.withCachedThreadPool(ExecutorService executor, int initialSize)
创建一个异步信道组,一个给定的线程池,创建新的线程,需要。
|
static AsynchronousChannelGroup |
AsynchronousChannelGroup.withFixedThreadPool(int nThreads, ThreadFactory threadFactory)
创建一个固定的线程池的异步信道组。
|
static AsynchronousChannelGroup |
AsynchronousChannelGroup.withThreadPool(ExecutorService executor)
创建一个给定线程池的异步信道组。
|
Modifier and Type | Method and Description |
---|---|
static AsynchronousSocketChannel |
AsynchronousSocketChannel.open(AsynchronousChannelGroup group)
打开一个异步套接字通道。
|
static AsynchronousServerSocketChannel |
AsynchronousServerSocketChannel.open(AsynchronousChannelGroup group)
打开一个异步服务器套接字通道。
|
Modifier and Type | Method and Description |
---|---|
abstract AsynchronousChannelGroup |
AsynchronousChannelProvider.openAsynchronousChannelGroup(ExecutorService executor, int initialSize)
用给定的线程池构造一个新的异步信道组。
|
abstract AsynchronousChannelGroup |
AsynchronousChannelProvider.openAsynchronousChannelGroup(int nThreads, ThreadFactory threadFactory)
用固定的线程池构造一个新的异步信道组。
|
Modifier and Type | Method and Description |
---|---|
abstract AsynchronousServerSocketChannel |
AsynchronousChannelProvider.openAsynchronousServerSocketChannel(AsynchronousChannelGroup group)
打开一个异步服务器套接字通道。
|
abstract AsynchronousSocketChannel |
AsynchronousChannelProvider.openAsynchronousSocketChannel(AsynchronousChannelGroup group)
打开一个异步套接字通道。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.