Update NIOServer.java

Subclass runnable for read/write threads;
Getters/setters for resources - to be abstracted into ObjectPools;
Simplify visibility of methods;
Allow non-string message passing/ encoding/decoding;
init-once-only checking;
other stuff.