Package net.solosky.maplefetion.event.action

Examples of net.solosky.maplefetion.event.action.FailureEvent


     if(this.proxyChatDialog instanceof LiveV2ChatDialog){
       LiveV2ChatDialog dialog = (LiveV2ChatDialog) this.proxyChatDialog;
       dialog.sendNudgeState(listener);
     }else{
       if(listener!=null)
         listener.fireEevent(new FailureEvent(FailureType.NOT_SUPPORTED));
     }
  }
View Full Code Here


    if(this.proxyChatDialog instanceof LiveV2ChatDialog){
       LiveV2ChatDialog dialog = (LiveV2ChatDialog) this.proxyChatDialog;
       dialog.sendInputState(listener);
     }else{
       if(listener!=null)
         listener.fireEevent(new FailureEvent(FailureType.NOT_SUPPORTED));
     }

  }
View Full Code Here

      serverDialog.userAuth(presence, listener);
      ActionEvent event = future.waitActionEventWithoutException();
      if(event.getEventType()==ActionEventType.SUCCESS){
        this.updateLoginState(LoginState.SIPC_REGISGER_SUCCESS, null);
      }else if(event.getEventType()==ActionEventType.FAILURE){
        FailureEvent evt = (FailureEvent) event;
        FailureType type =  evt.getFailureType();
        if(type==FailureType.REGISTER_FORBIDDEN){
          throw new LoginException(LoginState.SIPC_ACCOUNT_FORBIDDEN); //帐号限制登录,可能存在不安全因素,请修改密码后再登录
        }else if(type==FailureType.AUTHORIZATION_FAIL){
          throw new LoginException(LoginState.SIPC_AUTH_FAIL);      //登录验证失败
        }else{
View Full Code Here

                println("发送成功,消息已通过服务直接发送到对方客户端!");
              }
              break;
             
            case FAILURE:
              FailureEvent evt2 = (FailureEvent) event;
              switch(evt2.getFailureType()){
                case BUDDY_NOT_FOUND:
                  println("发送失败, 该用户可能不是你好友,请尝试添加该用户为好友后再发送消息。");
                  break;
                case USER_NOT_FOUND:
                  println("发送失败, 该用户不是移动用户。");
View Full Code Here

              println("发送成功,消息已通过短信发送到对方手机!");
            }else if(evt.isSendToClient()){
              println("发送成功,消息已通过服务直接发送到对方客户端!");
            }
           }else if(event.getEventType()==ActionEventType.FAILURE){
             FailureEvent evt2 = (FailureEvent) event;
            switch(evt2.getFailureType()){
              case BUDDY_NOT_FOUND:
                System.out.println("发送失败, 该用户可能不是你好友,请尝试添加该用户为好友后再发送消息。");
                break;
              case USER_NOT_FOUND:
                System.out.println("发送失败, 该用户不是移动用户。");
View Full Code Here

              System.out.println("发送成功,消息已通过服务直接发送到对方客户端!");
            }
            break;
           
          case FAILURE:
            FailureEvent evt2 = (FailureEvent) event;
            switch(evt2.getFailureType()){
              case BUDDY_NOT_FOUND:
                System.out.println("发送失败, 该用户可能不是你好友,请尝试添加该用户为好友后再发送消息。");
                break;
              case USER_NOT_FOUND:
                System.out.println("发送失败, 该用户不是移动用户。");
View Full Code Here

      if(this.state==ClientState.LOGGING) {
        this.cancelLogin();
      }else {
        ActionEventListener listener = event.getTargetListener();
        if(listener!=null) {
          listener.fireEevent(new FailureEvent(FailureType.VERIFY_CANCELED));
        }
      }
    }
View Full Code Here

    this.ensureOnline();
    Relation relation = toBuddy.getRelation();
    if( relation==Relation.BANNED||
      relation==Relation.DECLINED||
      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) {
View Full Code Here

   */
  public void sendSMSMessage(Buddy toBuddy, Message message, ActionEventListener listener)
  {
    this.ensureOnline();
    if(toBuddy.getRelation()==Relation.BANNED) {
      if(listener!=null) listener.fireEevent(new FailureEvent(FailureType.BUDDY_BLOCKED));
    }else {
      this.dialogFactory.getServerDialog().sendSMSMessage(toBuddy, message, listener);
    }
  }
View Full Code Here

    this.ensureOnline();
   
    //先判断是否是合法的移动号码
    if(!AccountValidator.validateMobile(mobile)){
      if(listener!=null){
        listener.fireEevent(new FailureEvent(FailureType.INVALID_ACCOUNT));
      }
    }
   
    //可能部分好友已经获取到了手机号,特别是没有开通飞信的好友手机号码就是已知的
    //为了提高效率,这里先遍历好友,查看是否有好友的手机号码和给定的号码相同
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.event.action.FailureEvent

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.