package hu.ppke.itk.java.hakta.hf06;

public class Connection {
	private final Switch mySwitch;
	private int delay;
	
	Connection(Switch mySwitch, int delay) {
		this.mySwitch = mySwitch;
		this.delay = delay;
	}
	
	public boolean download() throws InterruptedException {
		Thread.sleep(5000*delay);
		return true;
	}
	
	public void save() throws InterruptedException {
		Thread.sleep(5000*delay);
	}

	public void disconnect() {
		mySwitch.disconnect();
	}
}
