Package org.apache.openmeetings.persistence.beans.chat

Examples of org.apache.openmeetings.persistence.beans.chat.ChatMessage


    f.add(new Button("send").add(new AjaxFormSubmitBehavior("onclick"){
      private static final long serialVersionUID = -3746739738826501331L;
     
      protected void onSubmit(AjaxRequestTarget target) {
        ChatDao dao = Application.getBean(ChatDao.class);
        ChatMessage m = new ChatMessage();
        m.setMessage(message);
        m.setSent(new Date());
        m.setFromUser(Application.getBean(UsersDao.class).get(WebSession.getUserId()));
        dao.update(m);
        IWebSocketConnectionRegistry reg = IWebSocketSettings.Holder.get(getApplication()).getConnectionRegistry();
        for (IWebSocketConnection c : reg.getConnections(getApplication())) {
          try {
            c.sendMessage(getMessage(m).toString());
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.chat.ChatMessage

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.