コード例 #1
0
  public SearchService() {
    super();
    imCB = new ImRequestCallbackCB(this);
    ImRequest.getInstance().addCallback(imCB);

    grCB = new GroupRequestCB(this);
    GroupRequest.getInstance().addCallback(grCB);
  }
コード例 #2
0
  /**
   * Search content from server side
   *
   * @param par
   * @param caller
   */
  public void search(SearchParameter par, Registrant caller) {
    if (!this.checkParamNull(caller, par)) {
      return;
    }

    initTimeoutMessage(SEARCH, DEFAULT_TIME_OUT_SECS, caller);
    int startNo = (par.mPageNo - 1) * par.mPageSize;
    if (par.mType == Type.CROWD) {

      int gType = 0;
      if (par.mType == Type.CROWD) {
        gType = GroupType.CHATING.intValue();
      } else if (par.mType == Type.CONFERENCE) {
        gType = GroupType.CONFERENCE.intValue();
      }
      GroupRequest.getInstance().searchGroup(gType, par.text, startNo, par.mPageSize);
    } else if (par.mType == Type.MEMBER) {
      ImRequest.getInstance().searchMember(par.text, startNo, par.mPageSize);
    }
  }
コード例 #3
0
 @Override
 public void clearCalledBack() {
   ImRequest.getInstance().removeCallback(imCB);
   GroupRequest.getInstance().removeCallback(grCB);
 }