Hi, I am checking whether there is a clean way to shut down a NioSocketAcceptor (server socket) when my application shuts down (by sending server shutdown message to connected clients and then disconnecting them).
One option that came to my mind is to use a shutdown hook (where I pass the reference of the already created NioSocketAcceptor) and allow shutdown to happen. I considered an option to create a singleton class to hold the reference of NioSocketAcceptor and use the singleton class to start and shutdown the server. I would like to know whether there are better options. Regards, Richards Peter.
