Package net.solosky.maplefetion.client.dialog

Examples of net.solosky.maplefetion.client.dialog.ChatDialogProxy.sendChatMessage()


    public void sendSMS(String uri, final String msg)
    {
      try{
          Buddy buddy = this.client.getFetionStore().getBuddyByUri(uri);
          ChatDialogProxy dialog = this.client.getChatDialogProxyFactory().create(buddy);
        dialog.sendChatMessage(new Message(msg), new DefaultActionListener("发送消息[ "+msg+" ]给"+buddy.getDisplayName()));
        } catch (FetionException e) {
          println("建立对话框时出错"+e.getMessage());
        }
    }
View Full Code Here


              proxy = this.client.getChatDialogProxyFactory().create(buddy);
            } catch (DialogException e) {
            println("建立对话失败!!");
            return;
            }
        proxy.sendChatMessage( Message.wrap(message), new ActionEventListener(){
        public void fireEevent(ActionEvent event)
         {
           if(event.getEventType()==ActionEventType.SUCCESS){
            SendChatMessageSuccessEvent evt = (SendChatMessageSuccessEvent) event;
            if(evt.isSendToMobile()){
View Full Code Here

      relation==Relation.UNCONFIRMED) {
      if(listener!=null) listener.fireEevent(new FailureEvent(FailureType.BUDDY_RELATION_FORBIDDEN));
    }else {
        try {
          ChatDialogProxy proxy = this.proxyFactory.create(toBuddy);
          proxy.sendChatMessage(message, listener);
        } catch (DialogException e) {
          listener.fireEevent(new SystemErrorEvent(e));
        }
    }
  }
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.