blob: f4576047a3837d2a9e3ad5e11dc2293f0209dc8b [file] [log] [blame]
package tcp;
public class TimeWait extends State {
private static State instance;
public static State Instance() {
if (instance == null) {
instance = new TimeWait();
}
return instance;
}
public void timeWait() throws TimeoutException {
try {
Thread.sleep(3);
} catch (InterruptedException e) {
}
throw new TimeoutException();
}
@Override
protected void run() {
try {
timeWait();
} catch (TimeoutException e) {
Closed.Instance().activate();
}
}
}