public class AjaxProgress extends Object
| Constructor and Description |
|---|
AjaxProgress(long maximum)
Construct an AjaxProgress
|
AjaxProgress(String id,
long maximum)
Construct an AjaxProgress
|
| Modifier and Type | Method and Description |
|---|---|
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)
Convenience method for copying a stream and tracking it with this progress model.
|
void |
dispose()
Disposes any resources associated with this procedure.
|
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.
|
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(com.webobjects.appserver.WOSession session,
String id)
Returns the progress object with the given id (or null if one does not exist).
|
static void |
registerProgress(com.webobjects.appserver.WOSession session,
AjaxProgress progress)
Register a progress object in the registry.
|
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.
|
void |
setDone(boolean done)
Sets whether or not this procedure is done.
|
void |
setFailure(Throwable failure)
Sets the exception that caused this procedure to fail.
|
void |
setMaximum(long maximum)
Sets the maximum value for this progress model.
|
void |
setStatus(String status)
Sets the current status message for this process.
|
void |
setValue(long value)
Sets the current value of this progress model.
|
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(com.webobjects.appserver.WOSession session,
AjaxProgress progress)
Unregister a progress object from the registry.
|
long |
value()
Returns the current value of this progress model.
|
public AjaxProgress(long maximum)
maximum - the maximum value of this progresspublic AjaxProgress(String id, long maximum)
id - the id of this AjaxProgress (only useful if you're registering it with AjaxProgressBar's registry)maximum - the maximum value of this progresspublic String id()
public void setValue(long value)
value - the new valuepublic long value()
public void incrementValue(long count)
count - the mount to increment value bypublic void setMaximum(long maximum)
maximum - the maximum value for this progress modelpublic long maximum()
public double percentage()
public boolean isStarted()
public void setDone(boolean done)
done - whether or not this procedure is donepublic boolean isDone()
public void setFailure(Throwable failure)
failure - the exception that caused this procedure to failpublic Throwable failure()
public void cancel()
public boolean isCanceled()
public boolean isFailed()
public boolean isSucceeded()
public void dispose()
public void setCompletionEventsFired(boolean completionEventsFired)
completionEventsFired - whether or not this procedure has notified listeners of its completionpublic boolean completionEventsFired()
public void reset()
public boolean shouldReset()
public void setStatus(String status)
status - the current status message for this processpublic String status()
public void copyAndTrack(InputStream inputStream, OutputStream outputStream, long maxSize) throws IOException
inputStream - the input stream to copy fromoutputStream - the output stream to copy tomaxSize - the maximum size to readIOException - if there is a failurepublic static void registerProgress(com.webobjects.appserver.WOSession session,
AjaxProgress progress)
session - the sessionprogress - the progress object to registerpublic static void unregisterProgress(com.webobjects.appserver.WOSession session,
AjaxProgress progress)
session - the sessionprogress - the progress object to unregisterpublic static AjaxProgress progress(com.webobjects.appserver.WOSession session, String id)
session - the sessionid - the id of the progress to retrieveCopyright © 2002 – 2020 Project Wonder.