Package org.nutz.lang.socket

Examples of org.nutz.lang.socket.SocketContext


    try {
      LinkedHashMap<String, Object> map = Json.fromJson(LinkedHashMap.class,
                                              Streams.utf8r(socket.getInputStream()));
      SocketAction action = saTable.get(map.get("cmd").toString());
      if (null != action) {
        SocketContext context = new SocketContext(this);
        if(action instanceof JsonAction)
          ((JsonAction)action).run(map,context);
        else
          action.run(context);
      } else {
View Full Code Here


            }
            SocketAction action = saTable.get(map.get("cmd").toString());
            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())
View Full Code Here

TOP

Related Classes of org.nutz.lang.socket.SocketContext

Copyright © 2018 www.massapicom. 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.