Package org.elasticsearch.nio
Interface NioGroup
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
NioSelectorGroup
An class for interfacing with java.nio. Implementations implement the underlying logic for opening
channels and registering them with the OS.
-
Method Summary
Modifier and TypeMethodDescription<S extends NioServerSocketChannel>
SbindServerChannel(InetSocketAddress address, ChannelFactory<S, ?> factory) Opens and binds a server channel to accept incoming connections.voidclose()<S extends NioSocketChannel>
SopenChannel(InetSocketAddress address, ChannelFactory<?, S> factory) Opens a outgoing client channel.
-
Method Details
-
bindServerChannel
<S extends NioServerSocketChannel> S bindServerChannel(InetSocketAddress address, ChannelFactory<S, ?> factory) throws IOExceptionOpens and binds a server channel to accept incoming connections.- Throws:
IOException
-
openChannel
<S extends NioSocketChannel> S openChannel(InetSocketAddress address, ChannelFactory<?, S> factory) throws IOExceptionOpens a outgoing client channel.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-