|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.idm.util.progress.ProgressReporter
public class ProgressReporter
The ProgressReporter object is used to report progress in a flexible way, allowing for step reporting, percent reporting, or duration reporting. The methods in this class will automatically calculate values of properties that are not supplied by the event source, whenever possible.
For example, if step information is supplied by the event source, both percent and duration information will be calculated automatically by the ProgressReporter methods. If only percent information is specified by the event source, duration information will be calculated automatically. If no information is specified by the event source, only current duration will be calculated automatically. If total duration information is specified by the event source, percent information will be calculated automatically.
Constructor Summary | |
---|---|
ProgressReporter() Creates an instance of a ProgressReporter. |
|
ProgressReporter(ProgressManager manager) Creates an instance of a ProgressReporter. |
Method Summary | |
---|---|
void |
clearTransient() This method clears all transient throwables. |
void |
continuing() Call this method when continuing onto the next step in you process. |
long |
getDuration() Getter for the duration property. |
int |
getErrorTotal() Getter for the errorTotal property. |
static java.lang.Exception |
getException(java.lang.Throwable throwable) This method converts throwables to exceptions. |
static java.lang.String |
getLocalizedMessage(java.lang.Throwable throwable) This method returns throwable message. |
static java.util.Collection |
getLocalizedMessages(java.lang.Throwable throwable) Returns localized messages associated with the throwable and all of its causes. |
static java.lang.String |
getMessage(java.lang.Throwable throwable) This method returns throwable message. |
static java.util.Collection |
getMessages(java.lang.Throwable throwable) Returns messages associated with the throwable and all of its causes. |
ProgressManager |
getProgressManager() Getter method to return the ProgressManager. |
static java.lang.RuntimeException |
getRuntimeException(java.lang.Throwable throwable) This method converts throwables to runtime exceptions. |
java.lang.String |
getStateCurrent() Getter for the stateCurrent property. |
long |
getStateTimeStamp() Getter for the stateTimeStamp property. |
long |
getTimeout() Getter for the timeout property. |
java.util.Set |
getTransient() This method returns all transient throwables. |
int |
getWarningTotal() Getter for the warningTotal property. |
boolean |
hasTimedout() Getter for the timedout property. |
boolean |
isStateCurrent(java.lang.String state) Checks if the current state equals the state parameter. |
boolean |
isTransient(java.lang.Throwable throwable) This method returns true if the throwable is transient. |
void |
markTransient(java.lang.Throwable throwable) This method marks the throwable as transient. |
void |
reset() This method resets the progress reporter, call when you want to reuse the same progress reporter to report progress on a new process. |
void |
resetDuration() Resetter for the duration property. |
void |
sendProgressEvent(ProgressEvent event) This method sends a progress event the progress listeners. |
protected void |
setErrorTotal(int total) Setter for the errorTotal property. |
protected void |
setProgressManager(ProgressManager manager) Setter method for the ProgressManager. |
protected void |
setStateCurrent(java.lang.String current) Setter for the stateCurrent property. |
protected void |
setStateTimeStamp(long timeStamp) Setter for the stateTimeStamp property. |
void |
setTimeout(long timeout) Setter for the timeout property. |
protected void |
setWarningTotal(int total) Setter for the warningTotal property. |
void |
throwErrorOrException(java.lang.Throwable throwable) This method throws throwables as exceptions. |
void |
throwErrorOrRuntimeException(java.lang.Throwable throwable) This method throws throwables as runtime exceptions. |
void |
throwException(java.lang.Throwable throwable) This method throws throwables as exceptions. |
void |
throwRuntimeException(java.lang.Throwable throwable) This method throws throwables as runtime exceptions. |
void |
unmarkTransient(java.lang.Throwable throwable) This method unmarks the transient throwable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressReporter()
ProgressManager.getProgressReporter()
public ProgressReporter(ProgressManager manager)
manager
- ProgressManager that manages this ProgressMonitor.ProgressManager.getProgressReporter()
Method Detail |
---|
public ProgressManager getProgressManager()
protected void setProgressManager(ProgressManager manager)
public java.lang.String getStateCurrent()
protected void setStateCurrent(java.lang.String current)
String
- representing the current state.public boolean isStateCurrent(java.lang.String state)
public int getErrorTotal()
protected void setErrorTotal(int total)
total
- number of errors reported so farpublic int getWarningTotal()
protected void setWarningTotal(int total)
total
- number of warnings reported so farpublic long getStateTimeStamp()
protected void setStateTimeStamp(long timeStamp)
long
- representing the state time stamppublic long getDuration()
public void resetDuration()
public long getTimeout()
ProgressReporter
, TimeoutException
public void setTimeout(long timeout)
timeout
- The timeout after which APIs report TimeoutExceptions.getTimeout()
, TimeoutException
public boolean hasTimedout()
public void sendProgressEvent(ProgressEvent event)
event
-ProgressReporter
public void continuing()
public void reset()
public static java.lang.String getMessage(java.lang.Throwable throwable)
public static java.lang.String getLocalizedMessage(java.lang.Throwable throwable)
public static java.util.Collection getMessages(java.lang.Throwable throwable)
public static java.util.Collection getLocalizedMessages(java.lang.Throwable throwable)
public static java.lang.Exception getException(java.lang.Throwable throwable)
public static java.lang.RuntimeException getRuntimeException(java.lang.Throwable throwable)
public void markTransient(java.lang.Throwable throwable)
public void unmarkTransient(java.lang.Throwable throwable)
public boolean isTransient(java.lang.Throwable throwable)
public java.util.Set getTransient()
public void clearTransient()
public void throwException(java.lang.Throwable throwable) throws java.lang.Exception
java.lang.Exception
public void throwErrorOrException(java.lang.Throwable throwable) throws java.lang.Exception
java.lang.Exception
public void throwRuntimeException(java.lang.Throwable throwable)
public void throwErrorOrRuntimeException(java.lang.Throwable throwable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |