| |
|
| java.lang.Object com.salmonllc.html.PageRunThread
PageRunThread | abstract public class PageRunThread implements Runnable(Code) | | This class can be extended to implement tasks that take so long to process that that take so long to run that the browser times out. Implementing the process in the doProcess method of PageRunThread and running it via HtmlPage.startRunThread() will allow it to be executed from a page that can be refreshed every few seconds and display a progress meter.
|
Method Summary | |
public void | cancel() | abstract public void | doProcess() This should implement the long running task that the component will run. | public Exception | getException() This method returns the Exception thrown by the doProcess method if the status = STATUS_ERROR. | public int | getPercentComplete() This method returns a number from 0 to 100 that indicates the percent complete the process is. | public int | getStatus() This method returns the status of the thread. | public void | run() This method should not be called directly. | protected void | setPercentComplete(int perComplete) This method should be used by the doProcess method to inform the rest of the system how complete the process. | public void | setStatus(int status) This method was created in VisualAge. |
STATUS_CANCELED | final public static int STATUS_CANCELED(Code) | | |
STATUS_COMPLETED | final public static int STATUS_COMPLETED(Code) | | |
STATUS_ERROR | final public static int STATUS_ERROR(Code) | | |
STATUS_NOT_SET | final public static int STATUS_NOT_SET(Code) | | |
STATUS_NOT_STARTED | final public static int STATUS_NOT_STARTED(Code) | | |
STATUS_RUNNING | final public static int STATUS_RUNNING(Code) | | |
cancel | public void cancel()(Code) | | This method should stop the thread and set the status to STATUS_CANCELED
|
doProcess | abstract public void doProcess() throws Exception(Code) | | This should implement the long running task that the component will run. In addition, it should periodically check the status via getStatus() to determine if the process has been canceled by the user as well as setting the tasks percent complete (via setPercentComplete() method).
|
getException | public Exception getException()(Code) | | This method returns the Exception thrown by the doProcess method if the status = STATUS_ERROR. Otherwise it will return null;
java.lang.Exception |
getPercentComplete | public int getPercentComplete()(Code) | | This method returns a number from 0 to 100 that indicates the percent complete the process is.
|
getStatus | public int getStatus()(Code) | | This method returns the status of the thread. It should return one of the following values:STATUS_NOT_STARTED, STATUS_RUNNING, STATUS_COMPLETED,STATUS_CANCELED
|
run | public void run()(Code) | | This method should not be called directly. It is implemented for threading purposes.
|
setPercentComplete | protected void setPercentComplete(int perComplete)(Code) | | This method should be used by the doProcess method to inform the rest of the system how complete the process. Pass in a number between 0 and 100.
|
setStatus | public void setStatus(int status)(Code) | | This method was created in VisualAge.
Parameters: Status - int |
|
|
|