Example #1
0
 public void connectionEstablished(DownloadConnection downloadConnection) {
   connections.put(downloadConnection.getRemoteFriend(), downloadConnection);
   if (T.t) {
     T.trace(
         "Connection established: " + downloadConnection + " connections: " + connections.size());
   }
 }
Example #2
0
 public void removeConnection(DownloadConnection downloadConnection) throws IOException {
   connections.remove(downloadConnection.getRemoteFriend());
   if (connections.size() == 0 && isComplete()) {
     if (T.t) {
       T.info("Download is complete");
     }
     manager.downloadComplete(this);
   }
 }
Example #3
0
 public void addConnection(DownloadConnection con) {
   connections.put(con.getRemoteFriend(), con);
 }