if (null != action) {
SocketContext context = new SocketContext(this);
if(action instanceof JsonAction)
((JsonAction)action).run(map,context);
else
action.run(context);
} else {
Writer writer = Streams.utf8w(socket.getOutputStream());
Map<String, Object> x = new HashMap<String, Object>();
x.put("ok", false);
x.put("msg", "Unknown CMD");