Esempio n. 1
0
  public void queryFinished() {

    try {
      if (searchSignal != null) {
        searchSignal.sendSearchSignal(5);
      }
    } catch (RemoteException ex) {
      searchSignal = null;
      // DebugManager.getInstance().debug("Failure to send the signal to the client..");
      LoggerFactory.getLogger(Search.class).error(ex.getMessage(), ex);
    }
  }
Esempio n. 2
0
  // SearchHelper sends the local searchResults
  public void setLocalSearchResult(ArrayList<SearchResult> sResult) {
    this.resultList = sResult;

    try {
      if (searchSignal != null) {
        searchSignal.sendSearchSignal(0);
      }
    } catch (RemoteException ex) {
      searchSignal = null;
      // DebugManager.getInstance().debug("Failure to send the signal to the client..");
      LoggerFactory.getLogger(Search.class).error(ex.getMessage(), ex);
    }
  }
Esempio n. 3
0
  // SearchHelper sends the new P2P searchResults
  public void setP2PSearchResult(ArrayList<SearchResult> sResult) {
    // System.out.println("entrou no setP2PSearchResult com " + sResult.size() + " resultados");
    this.P2PResultList = sResult;

    try {
      if (searchSignal != null) {
        // System.out.println("there is searchsignal");
        searchSignal.sendSearchSignal(1);
      }
    } catch (RemoteException ex) {
      searchSignal = null;
      // DebugManager.getInstance().debug("Failure to send the signal to the client..");
      LoggerFactory.getLogger(Search.class).error(ex.getMessage(), ex);
    }
  }
Esempio n. 4
0
  public void setP2PThumbnails(ArrayList<SearchResult> sResult) {
    if (pendingP2PThumbnails != null) {
      pendingP2PThumbnails.addAll(sResult);
    } else {
      pendingP2PThumbnails = sResult;
    }

    try {
      if (searchSignal != null) {
        searchSignal.sendSearchSignal(3);
      }

    } catch (RemoteException ex) {
      searchSignal = null;
      // DebugManager.getInstance().debug("Failure to send the signal to the client..");
      LoggerFactory.getLogger(Search.class).error(ex.getMessage(), ex);
    }
  }
Esempio n. 5
0
  public void setExportSearchResult(ArrayList<SearchResult> sResult) {
    if (this.exportList != null) {
      exportList.addAll(sResult);
    } else {
      this.exportList = sResult;
    }

    try {

      if (searchSignal != null) {
        searchSignal.sendSearchSignal(4);
      }
    } catch (RemoteException ex) {
      searchSignal = null;
      // DebugManager.getInstance().debug("Failure to send the signal to the client..");
      LoggerFactory.getLogger(Search.class).error(ex.getMessage(), ex);
    }
  }