ChannelFactoryDefault

class ChannelFactoryDefault(executor: ExecutorService = Executors.newCachedThreadPool(ThreadFactoryNamed("Knio"))) : ChannelFactory

Default implementation of the AsynchronousChannelFactory interface.

This factory creates channels that execute tasks asynchronously using the specified executor service. Otherwise, the channels are created using the default configurations.

Constructors

Link copied to clipboard
constructor(executor: ExecutorService = Executors.newCachedThreadPool(ThreadFactoryNamed("Knio")))

Functions

Link copied to clipboard
open override fun openFileChannel(file: Path, vararg options: OpenOption): AsynchronousFileChannel

Opens an asynchronous file channel.

Link copied to clipboard

Opens an asynchronous server socket channel.

Link copied to clipboard

Opens an asynchronous socket channel.

Link copied to clipboard
open override fun shutdown()

Shuts down the factory and releases any resources.