Package iqq.im

Examples of iqq.im.QQException


   * @param response a {@link iqq.im.http.QQHttpResponse} object.
   * @throws iqq.im.QQException if any.
   */
  protected void onHttpStatusError(QQHttpResponse response) throws QQException {
    if(!doRetryIt(QQErrorCode.ERROR_HTTP_STATUS, null)){
      throw new QQException(QQErrorCode.ERROR_HTTP_STATUS);
    }
  }
View Full Code Here


      return true;
    }

    ++retryTimes;
    if( retryTimes < QQConstants.MAX_RETRY_TIMES){
      notifyActionEvent(QQActionEvent.Type.EVT_RETRY, new QQException(code, t));
      try {
        // 等待几秒再重试
        Thread.sleep(1500);
      } catch (InterruptedException e) {
        LOG.error("Sleep error...", e);
View Full Code Here

      level.setHours(result.getInt("hours"));
      level.setRemainDays(result.getInt("remainDays"));
      notifyActionEvent(QQActionEvent.Type.EVT_OK, user);
    }else{
      notifyActionEvent(QQActionEvent.Type.EVT_ERROR,
          new QQException(QQErrorCode.UNEXPECTED_RESPONSE, response.getResponseString()));
    }
  }
View Full Code Here

      JSONException {
    try {
      ByteArrayInputStream in = new ByteArrayInputStream(response.getResponseData());
      notifyActionEvent(QQActionEvent.Type.EVT_OK, ImageIO.read(in));
    } catch (IOException e) {
      notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.UNKNOWN_ERROR, e));
    }
  }
View Full Code Here

               }
               }
            }
            notifyActionEvent(QQActionEvent.Type.EVT_OK, recents);
        }else{
          notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.UNEXPECTED_RESPONSE));
        }
  }
View Full Code Here

    try {
      if(Thread.currentThread() != dispatchThread){
        dispatchThread.join();
      }
    } catch (InterruptedException e) {
      throw new QQException(QQException.QQErrorCode.UNKNOWN_ERROR, e);
    }
  }
View Full Code Here

        notifyActionEvent(QQActionEvent.Type.EVT_OK, user);
        return;
      }
    }

    notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(
        QQErrorCode.UNEXPECTED_RESPONSE, json.toString()));
  }
View Full Code Here

      JSONException {
    JSONObject json = new JSONObject(response.getResponseString());
        if (json.getInt("retcode") == 0) {
           notifyActionEvent(QQActionEvent.Type.EVT_OK, user);
        }else{
           notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.UNEXPECTED_RESPONSE));
        }
      
  }
View Full Code Here

              member.setNickname(infojson.getString("nick"));
            }
           
            notifyActionEvent(QQActionEvent.Type.EVT_OK, store.getDiscuzList());
        }else{
          notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.UNEXPECTED_RESPONSE));
        }
  }
View Full Code Here

               discuz.setName(dizjson.getString("name"));
               store.addDiscuz(discuz);
            }
            notifyActionEvent(QQActionEvent.Type.EVT_OK, store.getDiscuzList());
        }else{
          notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.UNEXPECTED_RESPONSE));
        }
  }
View Full Code Here

TOP

Related Classes of iqq.im.QQException

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.