channel.disconnect();
    public void disconnect()    {        synchronized (this)        {            if (!running)                return;            String localAddress = getAddress().toString();            sayGoodbye();            // Close the channel.            if (channel != null)            {                channel.close();                channel = null;            }            listener = null;            address = null;            running = false;            notify();            log.info(localAddress + " disconnected.");        }    }