package org.arefgard.icerya.flow.node;

/**
 * <wait>ノード。
 * 
 * @author Takashi Yamashina
 * @since 1.0.0
 */
public class WaitNode extends Node {
	
	/** ウェイトをかける時間(ミリ秒) */
	private long time;
	private String nextTo;

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public String getNextTo() {
		return nextTo;
	}

	public void setNextTo(String nextTo) {
		this.nextTo = nextTo;
	}
	
	/**
	 * ウェイトをかける。
	 * 
	 * @throws InterruptedException 割り込みが入った場合
	 */
	public void doWait() throws InterruptedException {
		Thread.sleep(time);
	}

}
