Examples of waitActionEventWithoutException()


Examples of net.solosky.maplefetion.event.action.ActionEventFuture.waitActionEventWithoutException()

      Dialog.assertActionEvent(future.waitActionEventWithException(), ActionEventType.SUCCESS);
     
      //用户验证
      future.clear();
      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();
View Full Code Here

Examples of net.solosky.maplefetion.event.action.ActionEventFuture.waitActionEventWithoutException()

   */
  private ActionEvent getScheduleSMSList()
  {
    ActionEventFuture future = new ActionEventFuture();
    this.context.getDialogFactory().getServerDialog().getScheduleSMSList(future);
    return future.waitActionEventWithoutException();
  }
 
  /**
   * 获取一组定时短信的详细信息
   */
 
View Full Code Here

Examples of net.solosky.maplefetion.event.action.ActionEventFuture.waitActionEventWithoutException()

   */
  private ActionEvent getScheduleSMSInfo(Collection<ScheduleSMS> list)
  {
    ActionEventFuture future = new ActionEventFuture();
    this.context.getDialogFactory().getServerDialog().getScheduleSMSInfo(list, future);
    return future.waitActionEventWithoutException();
  }
 
  /**
   * 获取所有的定时短信
   */
 
View Full Code Here

Examples of net.solosky.maplefetion.event.action.ActionEventFuture.waitActionEventWithoutException()

      ScheduleSMS sc = it.next();
      readyList.add(sc);
      if(readyList.size()==20){
        future.clear();
        dialog.getScheduleSMSInfo(readyList, future);
        ActionEvent event = future.waitActionEventWithoutException();
        if(event.getEventType()==ActionEventType.SUCCESS){
          readyList.clear();    //成功继续下一次请求
        }else{
          return event;      //失败返回这个错误事件
        }
View Full Code Here

Examples of net.solosky.maplefetion.event.action.ActionEventFuture.waitActionEventWithoutException()

   
    //迭代完了,可能仍有部分短信没有请求,检查下请求列表,如果不为空,则继续请求
    if(readyList.size()>0){
      future.clear();
      dialog.getScheduleSMSInfo(readyList, future);
      return future.waitActionEventWithoutException();
    }else{
      return new SuccessEvent();    //成功
    }
  }
 
View Full Code Here

Examples of net.solosky.maplefetion.event.action.ActionEventFuture.waitActionEventWithoutException()

      if(state==LoginState.LOGIN_SUCCESS){  //登录成功
        System.out.println("登录成功,正在发送消息至 "+args[2]+",请稍候...");                     
         
        ActionEventFuture future = new ActionEventFuture()//建立一个Future来等待操作事件     
        client.sendChatMessage(Long.parseLong(args[2]), new Message(args[3]), future);
        ActionEvent event = future.waitActionEventWithoutException()//等待操作完成事件
        switch(event.getEventType()){
         
          case SUCCESS:
            SendChatMessageSuccessEvent evt = (SendChatMessageSuccessEvent) event;
            if(evt.isSendToMobile()){
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.