예제 #1
0
  /**
   * Fetches the song list of a remote peer. It will try to get it from the DHT, if this doesn't
   * work, the module will communicate with the peer itself.
   *
   * @param peerAddress peer to fetch song list of
   * @return song list of remote peer. Returns null if nothing is found.
   */
  public CountingBloomFilter<Song> fetchRemoteSongList(PeerAddress peerAddress) {
    try {
      CountingBloomFilter<Song> songList = this.songListFetcher.fetchRemoteSongList(peerAddress);
      return songList;
    } catch (IOException e) {
      logger.error(
          "songhandler: could not fetch song list from peer: " + peerAddress.getID().toString());
    }

    return null;
  }