Package org.auto.comet.example.chat.web.view

Examples of org.auto.comet.example.chat.web.view.ResourceModelAndView


  public ModelAndView sendMessage(String userId, String targetUserId,
      String message) {
    this.chatService.sendMessage(userId, targetUserId, message);
    ModelMap modelMap = new ModelMap();
    modelMap.addAttribute("success", "true");
    return new ResourceModelAndView(modelMap);
  }
View Full Code Here


  @RequestMapping(params = "method=sendMessage")
  public ModelAndView sendMessage(String userId, String message) {
    this.chatRoomService.sendMessage(userId, message);
    ModelMap modelMap = new ModelMap();
    modelMap.addAttribute("success", "true");
    return new ResourceModelAndView(modelMap);
  }
View Full Code Here

    } catch (UserIdRepeatException e) {
      modelMap.addAttribute("success", false);
      return new ModelAndView("jsonView", modelMap);
    }
    modelMap.addAttribute("success", true);
    return new ResourceModelAndView(modelMap);
  }
View Full Code Here

  @RequestMapping(params = "method=getUserList")
  public ModelAndView getUserList() {
    ModelMap modelMap = new ModelMap();
    Set<Serializable> users = this.chatRoomService.getUserList();
    modelMap.addAttribute("users", users);
    return new ResourceModelAndView(modelMap);
  }
View Full Code Here

  @RequestMapping(params = "method=sayHelloJson")
  public ModelAndView sayHelloJson(@RequestParam("id") Integer id) {
    ModelMap modelMap = new ModelMap();
    modelMap.addAttribute("hello", "hello " + id);
    System.out.println("sayHelloJson req");
    return new ResourceModelAndView(modelMap);
  }
View Full Code Here

  @RequestMapping(params = "method=sendMessageToAll")
  public ModelAndView sendMessageToAll(String message) {
    ModelMap modelMap = new ModelMap();
    modelMap.addAttribute("success", "true");
    this.testConcurrentHandler.sendToAll(message);
    return new ResourceModelAndView(modelMap);
  }
View Full Code Here

TOP

Related Classes of org.auto.comet.example.chat.web.view.ResourceModelAndView

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.