|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.ajax.AjaxProgress
public class AjaxProgress
AjaxProgress is the model for an AjaxProgressBar. By holding onto this, you can keep track of and control the progress of whatever operation is bound to this progress object.
Constructor Summary | |
---|---|
AjaxProgress(int maximum)
Construct an AjaxProgress |
|
AjaxProgress(java.lang.String id,
int maximum)
Construct an AjaxProgress |
Method Summary | |
---|---|
void |
cancel()
Cancels this procedure. |
boolean |
completionEventsFired()
Returns whether or not this procedure has notified listeners of its completion. |
void |
copyAndTrack(java.io.InputStream inputStream,
java.io.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. |
java.lang.Throwable |
failure()
Returns the exception that caused this procedure to fail. |
java.lang.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,
java.lang.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(java.lang.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(java.lang.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. |
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxProgress(int maximum)
maximum
- the maximum value of this progresspublic AjaxProgress(java.lang.String id, int maximum)
id
- the id of this AjaxProgress (only useful if you're registering it with AjaxProgressBar's registry)maximum
- the maximum value of this progressMethod Detail |
---|
public java.lang.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(java.lang.Throwable failure)
failure
- the exception that caused this procedure to failpublic java.lang.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(java.lang.String status)
status
- the current status message for this processpublic java.lang.String status()
public void copyAndTrack(java.io.InputStream inputStream, java.io.OutputStream outputStream, long maxSize) throws java.io.IOException
inputStream
- the inputstream to copy fromoutputStream
- the outputstream to copy tomaxSize
- the maximum size to read
java.io.IOException
- 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, java.lang.String id)
session
- the sessionid
- the id of the progress to retrieve
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |