Package ipsk.util
Class ProgressStatus
- java.lang.Object
-
- ipsk.util.ProgressStatus
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ProgressStatus extends java.lang.Object implements java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description static long
LENGTH_UNKNOWN
-
Constructor Summary
Constructors Constructor Description ProgressStatus()
ProgressStatus(boolean indeterminate, boolean finished, long progress)
ProgressStatus(boolean indeterminate, boolean finished, long length, long progress)
ProgressStatus(boolean finished, long progress)
ProgressStatus(long progress)
ProgressStatus(long progress, LocalizableMessage message)
ProgressStatus(java.lang.Object arg0, boolean finished)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
void
canceled()
ProgressStatus
clone()
void
done()
java.lang.Long
elapsedTimeMillis()
Get elapsed time in milliseconds.void
error()
void
error(LocalizableMessage errorMsg)
java.lang.Long
estimatedFinishMillis()
java.util.Date
estimatedFinishTime()
java.util.Date
getErrorTime()
java.util.Date
getFinishedTime()
long
getLength()
LocalizableMessage
getMessage()
LocalizableMessage[]
getMessages()
java.lang.Short
getPercentProgress()
long
getProgress()
Worker.State
getStatus()
ProgressStatus
getSubStatus()
boolean
hasCancelRequest()
boolean
isCanceled()
boolean
isDone()
boolean
isError()
boolean
isIndeterminate()
void
open()
void
reset()
void
running()
void
setFinishedTime(java.util.Date finishedTime)
void
setIndeterminate(boolean indeterminate)
void
setLength(long length)
void
setMessage(LocalizableMessage message)
void
setProgress(long progress)
void
setSubStatus(ProgressStatus subStatus, long subStatusLength)
void
start()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ProgressStatus
public ProgressStatus()
-
ProgressStatus
public ProgressStatus(boolean indeterminate, boolean finished, long progress)
-
ProgressStatus
public ProgressStatus(boolean indeterminate, boolean finished, long length, long progress)
-
ProgressStatus
public ProgressStatus(long progress)
-
ProgressStatus
public ProgressStatus(java.lang.Object arg0, boolean finished)
-
ProgressStatus
public ProgressStatus(boolean finished, long progress)
-
ProgressStatus
public ProgressStatus(long progress, LocalizableMessage message)
-
-
Method Detail
-
clone
public ProgressStatus clone()
- Overrides:
clone
in classjava.lang.Object
-
open
public void open()
-
start
public void start()
-
running
public void running()
-
reset
public void reset()
-
getProgress
public long getProgress()
-
getPercentProgress
public java.lang.Short getPercentProgress()
-
isIndeterminate
public boolean isIndeterminate()
-
isDone
public boolean isDone()
-
setIndeterminate
public void setIndeterminate(boolean indeterminate)
-
setProgress
public void setProgress(long progress)
-
done
public void done()
-
getMessage
public LocalizableMessage getMessage()
-
setMessage
public void setMessage(LocalizableMessage message)
-
getMessages
public LocalizableMessage[] getMessages()
-
getSubStatus
public ProgressStatus getSubStatus()
-
setSubStatus
public void setSubStatus(ProgressStatus subStatus, long subStatusLength)
-
getLength
public long getLength()
-
setLength
public void setLength(long length)
-
getFinishedTime
public java.util.Date getFinishedTime()
-
setFinishedTime
public void setFinishedTime(java.util.Date finishedTime)
-
elapsedTimeMillis
public java.lang.Long elapsedTimeMillis()
Get elapsed time in milliseconds.- Returns:
- elapsed time or null if unknown
-
estimatedFinishMillis
public java.lang.Long estimatedFinishMillis()
-
estimatedFinishTime
public java.util.Date estimatedFinishTime()
-
cancel
public void cancel()
-
hasCancelRequest
public boolean hasCancelRequest()
-
canceled
public void canceled()
-
isCanceled
public boolean isCanceled()
-
isError
public boolean isError()
-
error
public void error()
-
error
public void error(LocalizableMessage errorMsg)
-
getErrorTime
public java.util.Date getErrorTime()
-
getStatus
public Worker.State getStatus()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-