< prev index next >
core/JemmyCore/src/org/jemmy/action/Action.java
Print this page
@@ -26,11 +26,10 @@
import org.jemmy.JemmyException;
/**
- *
* @author shura, KAM
*/
public abstract class Action {
private boolean interrupted = false;
@@ -39,12 +38,11 @@
/**
* 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
+ * @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,69 +60,42 @@
} 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
+ * 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;
}
/**
< prev index next >