< prev index next >
core/JemmyCore/src/org/jemmy/action/Action.java
Print this page
*** 26,36 ****
import org.jemmy.JemmyException;
/**
- *
* @author shura, KAM
*/
public abstract class Action {
private boolean interrupted = false;
--- 26,35 ----
*** 39,50 ****
/**
* Executes {@linkplain #run(java.lang.Object[]) run()} method of this
* Action, saving the duration of its execution and storing any
* RuntimeException and Error which may occur during its work.
! * @param parameters Parameters to pass to {@linkplain
! * #run(java.lang.Object[]) run()} method
* @see #getThrowable()
* @see #failed()
*/
public final void execute(Object... parameters) {
startTime = System.currentTimeMillis();
--- 38,48 ----
/**
* Executes {@linkplain #run(java.lang.Object[]) run()} method of this
* Action, saving the duration of its execution and storing any
* RuntimeException and Error which may occur during its work.
! * @param parameters Parameters to pass to {@linkplain #run(java.lang.Object[]) run()} method
* @see #getThrowable()
* @see #failed()
*/
public final void execute(Object... parameters) {
startTime = System.currentTimeMillis();
*** 62,130 ****
} finally {
endTime = System.currentTimeMillis();
}
}
- /**
- *
- * @return
- */
public long getEndTime() {
return endTime;
}
- /**
- *
- * @return
- */
public long getStartTime() {
return startTime;
}
/**
! * Should be used from {@linkplain #run(java.lang.Object[]) run()) method
* to check whether execution time is withing allowed time
* @return true if difference between current time and start time is less
* then allowed time; false otherwice
*/
protected boolean withinAllowedTime() {
return System.currentTimeMillis() - startTime < allowedTime;
}
- /**
- *
- * @return
- */
public long getAllowedTime() {
return allowedTime;
}
- /**
- *
- * @param allowedTime
- */
public void setAllowedTime(long allowedTime) {
this.allowedTime = allowedTime;
}
- /**
- *
- * @param parameters
- */
public abstract void run(Object... parameters) throws Exception;
- /**
- *
- * @return
- */
public boolean isInterrupted() {
return interrupted;
}
- /**
- *
- */
public void interrupt() {
this.interrupted = true;
}
/**
--- 60,101 ----
} finally {
endTime = System.currentTimeMillis();
}
}
public long getEndTime() {
return endTime;
}
public long getStartTime() {
return startTime;
}
/**
! * Should be used from {@linkplain #run(java.lang.Object[]) run()} method
* to check whether execution time is withing allowed time
* @return true if difference between current time and start time is less
* then allowed time; false otherwice
*/
protected boolean withinAllowedTime() {
return System.currentTimeMillis() - startTime < allowedTime;
}
public long getAllowedTime() {
return allowedTime;
}
public void setAllowedTime(long allowedTime) {
this.allowedTime = allowedTime;
}
public abstract void run(Object... parameters) throws Exception;
public boolean isInterrupted() {
return interrupted;
}
public void interrupt() {
this.interrupted = true;
}
/**
< prev index next >