Package org.nutz.lang.socket

Examples of org.nutz.lang.socket.SocketAction.run()


      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");
View Full Code Here


            if (null != action) {
                if (log.isDebugEnabled())
                    log.debugf("handle request by "+ action);
                SocketContext context = new SocketContext(this);
                context.set("json_data", map);
                action.run(context);
                if (log.isDebugEnabled())
                    log.debugf("finish request by "+ action);
            } else {
                if (log.isWarnEnabled())
                    log.warn("Unknown CMD="+map.get("cmd"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.