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