Interface NioGroup

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    NioSelectorGroup

    public interface NioGroup
    extends java.io.Closeable
    An class for interfacing with java.nio. Implementations implement the underlying logic for opening channels and registering them with the OS.
    • Method Detail

      • bindServerChannel

        <S extends NioServerSocketChannel> S bindServerChannel​(java.net.InetSocketAddress address,
                                                               ChannelFactory<S,​?> factory)
                                                        throws java.io.IOException
        Opens and binds a server channel to accept incoming connections.
        Throws:
        java.io.IOException
      • openChannel

        <S extends NioSocketChannel> S openChannel​(java.net.InetSocketAddress address,
                                                   ChannelFactory<?,​S> factory)
                                            throws java.io.IOException
        Opens a outgoing client channel.
        Throws:
        java.io.IOException
      • close

        void close()
            throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException