public void connect() throws IOException
        {
            // Create a new selector
            this.selector = SelectorProvider.provider().openSelector();

            // Create a new non-blocking server socket channel
            this.serverChannel = ServerSocketChannel.open();
            serverChannel.configureBlocking(false);

            // Bind the server socket to the specified address and port
            serverChannel.socket().bind(address);

            // Register the server socket channel, indicating an interest in
            // accepting new connections
            serverChannel.register(selector, SelectionKey.OP_ACCEPT);

            log.log( Level.FINE, "Hosting TCP connection:{0}.", address );
        }
Because we want to keep the keys to ourselves, we'll do
 the endpoint -&gt; key mapping internally.
jme3-networking/src/main/java/com/jme3/network/kernel/tcp/SelectorKernel.java