Package com.changestuffs.shared.dto

Examples of com.changestuffs.shared.dto.IMessageResponse


              }

              @Override
              public void onMessage(String message) {
                GWT.log("Socket received: " + message);
                IMessageResponse response = getResponse(message);
                if(MessageType.login == response.getMessageType()){
                  GWT.log(response.getFrom()+" is online");
                  user.getOnline().add(response.getFrom());
                  getView().updateContact(new ContactInfo(response.getFrom(), true));
                 
                }else if(MessageType.logout == response.getMessageType()){
                  GWT.log(response.getFrom()+" is offline");
                  user.getOnline().remove(response.getFrom());
                  getView().updateContact(new ContactInfo(response.getFrom(), false));
                }else if(MessageType.removeContact == response.getMessageType()){
                  removeContact(response.getFrom());
                }else if(MessageType.addContact == response.getMessageType()){
                  appendFriend(response.getFrom());
                }else{
                  addConversation(response.getFrom(), response);
                  getView().appendMessage(response.getFrom(), response);
                }
              }

              @Override
              public void onError(ChannelError error) {
View Full Code Here


    }
  }
 
  private IMessageResponse getResponse(String json){
    AutoBean<IMessageResponse> autoBeanClone = AutoBeanCodex.decode(beanFactory, IMessageResponse.class, json);
    IMessageResponse bean = autoBeanClone.as();
    return bean;
  }
View Full Code Here

TOP

Related Classes of com.changestuffs.shared.dto.IMessageResponse

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.