
Public Member Functions | |
| AjaxProgress (String id, int maximum) | |
| AjaxProgress (int maximum) | |
| void | cancel () |
| boolean | completionEventsFired () |
| void | copyAndTrack (InputStream inputStream, OutputStream outputStream, long maxSize) throws IOException |
| void | dispose () |
| Throwable | failure () |
| String | id () |
| void | incrementValue (long count) |
| boolean | isCanceled () |
| boolean | isDone () |
| boolean | isFailed () |
| boolean | isStarted () |
| boolean | isSucceeded () |
| long | maximum () |
| double | percentage () |
| void | reset () |
| void | setCompletionEventsFired (boolean completionEventsFired) |
| void | setDone (boolean done) |
| void | setFailure (Throwable failure) |
| void | setMaximum (long maximum) |
| void | setStatus (String status) |
| void | setValue (long value) |
| boolean | shouldReset () |
| String | status () |
| long | value () |
Static Public Member Functions | |
| static AjaxProgress | progress (WOSession session, String id) |
| static void | registerProgress (WOSession session, AjaxProgress progress) |
| static void | unregisterProgress (WOSession session, AjaxProgress progress) |
Private Attributes | |
| boolean | _canceled |
| boolean | _completionEventsFired |
| boolean | _done |
| Throwable | _failure |
| String | _id |
| long | _maximum |
| boolean | _reset |
| String | _status |
| long | _value |
| AjaxProgress | ( | int | maximum | ) |
| AjaxProgress | ( | String | id, | |
| int | maximum | |||
| ) |
Construct an AjaxProgress
| id | the id of this AjaxProgress (only useful if you're registering it with AjaxProgressBar's registry) | |
| maximum | the maximum value of this progress |
| void cancel | ( | ) |
Cancels this procedure.
| boolean completionEventsFired | ( | ) |
Returns whether or not this procedure has notified listeners of its completion.
| void copyAndTrack | ( | InputStream | inputStream, | |
| OutputStream | outputStream, | |||
| long | maxSize | |||
| ) | throws IOException |
Convenience method for copying a stream and tracking it with this progress model.
| inputStream | the inputstream to copy from | |
| outputStream | the outputstream to copy to | |
| maxSize | the maximum size to read |
| IOException | if there is a failure |
| void dispose | ( | ) |
Disposes any resources associated with this procedure.
Reimplemented in AjaxUploadProgress.
| Throwable failure | ( | ) |
Returns the exception that caused this procedure to fail.
| String id | ( | ) |
Returns the id of this progress model.
| void incrementValue | ( | long | count | ) |
Increment value by the given amount.
| count | the mount to increment value by |
| boolean isCanceled | ( | ) |
Returns true if this procedure was canceled.
| boolean isDone | ( | ) |
Returns whether or not this procedure is done.
| boolean isFailed | ( | ) |
Returns true if this procedure failed (and was not canceled).
| boolean isStarted | ( | ) |
Returns whether or not this procedure has started.
| boolean isSucceeded | ( | ) |
Returns true if this procedure is done, not canceled, and not failed.
| long maximum | ( | ) |
Returns the maximum value for this progress model.
| double percentage | ( | ) |
Returns the percentage completion of this progress model (0.0 - 1.0).
| static AjaxProgress progress | ( | WOSession | session, | |
| String | id | |||
| ) | [static] |
Returns the progress object with the given id (or null if one does not exist).
| session | the session | |
| id | the id of the progress to retrieve |
| static void registerProgress | ( | WOSession | session, | |
| AjaxProgress | progress | |||
| ) | [static] |
Register a progress object in the registry.
| session | the session | |
| progress | the progress object to register |
| void reset | ( | ) |
Flags the attached procedure to reset the next time it is processed.
| void setCompletionEventsFired | ( | boolean | completionEventsFired | ) |
Sets whether or not this procedure has notified listeners of its completion.
| completionEventsFired | whether or not this procedure has notified listeners of its completion |
| void setDone | ( | boolean | done | ) |
Sets whether or not this procedure is done.
| done | whether or not this procedure is done |
| void setFailure | ( | Throwable | failure | ) |
Sets the exception that caused this procedure to fail.
| failure | the exception that caused this procedure to fail |
| void setMaximum | ( | long | maximum | ) |
Sets the maximum value for this progress model.
| maximum | the maximum value for this progress model |
| void setStatus | ( | String | status | ) |
Sets the current status message for this process.
| status | the current status message for this process |
| void setValue | ( | long | value | ) |
Sets the current value of this progress model. In the context of an upload, value would represent the number of bytes uploaded so far.
| value | the new value |
| boolean shouldReset | ( | ) |
Returns whether or not the attached procedure should reset the next time it is processed.
| String status | ( | ) |
Returns the current status message for this process.
| static void unregisterProgress | ( | WOSession | session, | |
| AjaxProgress | progress | |||
| ) | [static] |
Unregister a progress object from the registry.
| session | the session | |
| progress | the progress object to unregister |
| long value | ( | ) |
Returns the current value of this progress model. If this model isSucceeded, then this will return maximum().
boolean _canceled [private] |
boolean _completionEventsFired [private] |
boolean _done [private] |
Throwable _failure [private] |
long _maximum [private] |
boolean _reset [private] |
long _value [private] |
1.5.8