public class SimpleProgressGauge extends DestroyableBase implements ProgressGauge
ProgressGauge.ListenerDestroyable.Utillogger| Constructor and Description |
|---|
SimpleProgressGauge() |
SimpleProgressGauge(int maxHint) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ProgressGauge.Listener listener)
Add an listener to this gauge that monitors the progress update
|
int |
currentProgressPercent() |
int |
currentSteps()
Report the current progress steps
|
boolean |
done()
Mark the progress has been finished
|
int |
getCurrentSteps() |
java.lang.String |
getId() |
int |
getMaxHint() |
int |
getProgressPercent() |
int |
maxHint()
Returns the max hint
|
protected void |
releaseResources() |
void |
setId(java.lang.String id)
Set ID to the gauge
|
void |
step()
Advances the progress by one step
|
void |
stepBy(int steps)
Advances the progress by specified steps
|
void |
stepTo(int steps)
Log progress
|
void |
updateMaxHint(int maxHint)
Update max hint.
|
static SimpleProgressGauge |
wrap(ProgressGauge progressGauge) |
static java.lang.String |
wsJobProgressTag(java.lang.String jobId) |
addSubResource, destroy, isDestroyed, reload, scopedebug, debug, error, error, fatal, fatal, info, info, isDebugEnabled, isTraceEnabled, trace, trace, warn, warnpublic SimpleProgressGauge(int maxHint)
public SimpleProgressGauge()
protected void releaseResources()
releaseResources in class DestroyableBasepublic void addListener(ProgressGauge.Listener listener)
ProgressGaugeAdd an listener to this gauge that monitors the progress update
addListener in interface ProgressGaugelistener - the listenerpublic void updateMaxHint(int maxHint)
ProgressGaugeUpdate max hint. If the number is negative, then it indicate the progress is indefinite
updateMaxHint in interface ProgressGaugemaxHint - the max steps hintpublic void step()
ProgressGaugeAdvances the progress by one step
step in interface ProgressGaugepublic void stepBy(int steps)
ProgressGaugeAdvances the progress by specified steps
stepBy in interface ProgressGaugesteps - the step sizepublic void stepTo(int steps)
ProgressGaugeLog progress
stepTo in interface ProgressGaugesteps - the new progress valuepublic int currentSteps()
ProgressGaugeReport the current progress steps
currentSteps in interface ProgressGaugepublic int getCurrentSteps()
public int maxHint()
ProgressGaugeReturns the max hint
maxHint in interface ProgressGaugepublic int getMaxHint()
public void setId(java.lang.String id)
ProgressGaugeSet ID to the gauge
setId in interface ProgressGaugeid - the gauge IDpublic java.lang.String getId()
public int currentProgressPercent()
public int getProgressPercent()
public boolean done()
ProgressGaugeMark the progress has been finished
done in interface ProgressGaugepublic static SimpleProgressGauge wrap(ProgressGauge progressGauge)
public static java.lang.String wsJobProgressTag(java.lang.String jobId)
Copyright © 2014–2017 ActFramework. All rights reserved.