예제 #1
0
 public void connectionEstablished(DownloadConnection downloadConnection) {
   connections.put(downloadConnection.getRemoteFriend(), downloadConnection);
   if (T.t) {
     T.trace(
         "Connection established: " + downloadConnection + " connections: " + connections.size());
   }
 }
예제 #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);
   }
 }
예제 #3
0
 public void addConnection(DownloadConnection con) {
   connections.put(con.getRemoteFriend(), con);
 }