|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.idm.util.progress.ProgressReporter
oracle.idm.util.progress.ProgressProcessor
public abstract class ProgressProcessor
This class provides a base implementation for progress event producing tools.
ProgressProcessor allows only direct access to state transitions. For queued requests for state transition, see ProgressRequestProcessor.
ProgressRequestProcessor
Field Summary | |
---|---|
static java.lang.String |
ABORTED Internally triggered state indicates that processing has been aborted. |
static java.lang.String |
CANCELED Externally triggered state indicates that processing has been canceled. |
static java.lang.String |
FINISHED Internally triggered state indicates that processing has been finished. |
protected DurationInfo |
progressEventDurationInfo |
protected java.lang.String |
progressEventLocalizedMessage |
protected java.lang.String |
progressEventMessage |
protected java.lang.String |
progressEventName |
protected PercentInfo |
progressEventPercentInfo |
protected java.lang.Object |
progressEventProgressInfo |
protected StateInfo |
progressEventStateInfo |
protected StatusInfo |
progressEventStatusInfo |
protected StepInfo |
progressEventStepInfo |
protected java.lang.Throwable |
progressEventThrowable |
static java.lang.String |
RESTORED Internally triggered state indicates that processing has been restored. |
static java.lang.String |
RESUMED Externally triggered state indicates that processing has been resumed. |
static java.lang.String |
STARTED Externally triggered state indicates that processing has been started. |
static java.lang.String |
STOPPED Externally triggered state indicates that processing has been stopped. |
static java.lang.String |
SUSPENDED Externally triggered state indicates that processing has been suspended. |
static java.lang.String |
TIMEDOUT Internally triggered state indicates that processing has been timedout. |
protected Transitions |
transitions |
static Transitions |
TRANSITIONS State transition model (null is the pre-initial state): |
Constructor Summary | |
---|---|
protected |
ProgressProcessor() |
protected |
ProgressProcessor(ProgressManager manager) |
protected |
ProgressProcessor(ProgressManager manager, Transitions transitions) |
protected |
ProgressProcessor(Transitions transitions) |
Method Summary | |
---|---|
protected boolean |
abort(boolean quiet) |
protected void |
block() This method will block until notified. |
protected void |
block(java.util.Set states) This method will block while the states contains the current state. |
protected void |
block(java.lang.String state) This method will block while the state is the current state. |
boolean |
canAbort() |
boolean |
canCancel() |
protected void |
cancel() This method calls cancel(false). |
protected boolean |
cancel(boolean quiet) |
boolean |
canFinish() |
boolean |
canReset() |
boolean |
canRestore() |
boolean |
canResume() |
boolean |
canStart() |
boolean |
canStop() |
boolean |
canSuspend() |
boolean |
canTimeout() |
boolean |
canTransition(java.lang.String state) Checks if the current state can be transitioned to the state parameter. |
protected boolean |
finish(boolean quiet) |
protected ProgressEvent |
getProgressEvent() |
protected DurationInfo |
getProgressEventDurationInfo() |
protected java.lang.String |
getProgressEventLocalizedMessage() |
protected java.lang.String |
getProgressEventMessage() |
protected java.lang.String |
getProgressEventName() |
protected PercentInfo |
getProgressEventPercentInfo() |
protected java.lang.Object |
getProgressEventProgressInfo() |
protected StateInfo |
getProgressEventStateInfo() |
protected StatusInfo |
getProgressEventStatusInfo() |
protected StepInfo |
getProgressEventStepInfo() |
protected java.lang.Throwable |
getProgressEventThrowable() |
protected Transitions |
getTransitions() |
boolean |
isAborted() |
boolean |
isCanceled() |
protected boolean |
isFinal() Checks if the current state is one of the final states. |
boolean |
isFinished() |
protected boolean |
isInitial() Checks if the current state is one of the initial states. |
protected boolean |
isIntermediate() Checks if the current state is one of the intermediate states. |
protected boolean |
isNext(java.lang.String state) Checks if the given state is one of the next states. |
protected boolean |
isPrevious(java.lang.String state) Checks if the given state is one of the previous states. |
protected boolean |
isReachable() Checks if the current state is one of the reachable states. |
boolean |
isReset() |
boolean |
isRestored() |
boolean |
isResumed() |
boolean |
isStarted() |
boolean |
isStopped() |
boolean |
isSuspended() |
boolean |
isTimedout() |
protected boolean |
isUnreachable() Checks if the current state is one of the unreachable states. |
void |
ping() This method will send a ping progress event. |
protected abstract void |
process(boolean quiet) This method does all of the processing. |
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. |
protected boolean |
restore(boolean quiet) |
protected void |
resume() This method calls resume(false). |
protected boolean |
resume(boolean quiet) |
void |
run() Implements runnable, calls start(). |
protected void |
sendProgressEvent() This method will send a progress event. |
protected void |
setTransitions(Transitions transitions) |
protected void |
start() This method calls process(false) and catches any throwables that happen during processing, reports them to listeners, and it attempts to transition to aborted state. |
protected boolean |
start(boolean quiet) |
protected void |
stop() This method calls stop(false). |
protected boolean |
stop(boolean quiet) |
protected void |
suspend() This method calls suspend(false). |
protected boolean |
suspend(boolean quiet) |
protected boolean |
timeout(boolean quiet) |
protected boolean |
transition(java.lang.String state, boolean quiet) This method will change current state to the state parameter and send a progress event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STARTED
public static final java.lang.String STOPPED
public static final java.lang.String CANCELED
public static final java.lang.String RESTORED
public static final java.lang.String SUSPENDED
public static final java.lang.String RESUMED
public static final java.lang.String FINISHED
public static final java.lang.String ABORTED
public static final java.lang.String TIMEDOUT
public static final Transitions TRANSITIONS
null -> STARTED STARTED -> [ STOPPED | CANCELED | SUSPENDED | FINISHED | ABORTED | TIMEDOUT ] CANCELED -> [ STOPPED | RESTORED | ABORTED | TIMEDOUT ] SUSPENDED -> [ STOPPED | CANCELED | RESUMED | FINISHED | ABORTED | TIMEDOUT ] RESUMED -> [ STOPPED | CANCELED | SUSPENDED | FINISHED | ABORTED | TIMEDOUT ]
protected Transitions transitions
protected java.lang.String progressEventName
protected java.lang.String progressEventMessage
protected java.lang.String progressEventLocalizedMessage
protected java.lang.Throwable progressEventThrowable
protected StateInfo progressEventStateInfo
protected StatusInfo progressEventStatusInfo
protected StepInfo progressEventStepInfo
protected PercentInfo progressEventPercentInfo
protected DurationInfo progressEventDurationInfo
protected java.lang.Object progressEventProgressInfo
Constructor Detail |
---|
protected ProgressProcessor()
protected ProgressProcessor(ProgressManager manager)
protected ProgressProcessor(Transitions transitions)
protected ProgressProcessor(ProgressManager manager, Transitions transitions)
Method Detail |
---|
protected Transitions getTransitions()
protected void setTransitions(Transitions transitions)
public void run()
run
in interface java.lang.Runnable
protected void start() throws java.lang.Exception
If the throwable caught by this method is marked as transient, it will not be reported to the progress listeners and abort transition will not be attempted.
Subclasses should make this method public.
java.lang.Exception
protected void stop()
Subclasses that support STOPPED state should make this method public.
protected void cancel()
Subclasses that support CANCELED state should make this method public.
protected void suspend()
Subclasses that support SUSPENDED state should make this method public.
protected void resume()
Subclasses that support RESUMED state should make this method public.
protected abstract void process(boolean quiet) throws java.lang.Exception
This method must not be synchronized!!!
quiet
- if quiet is true, this method does not throw transition exceptionsjava.lang.Exception
protected void block()
protected void block(java.lang.String state)
protected void block(java.util.Set states)
protected boolean isNext(java.lang.String state)
protected boolean isPrevious(java.lang.String state)
protected boolean isInitial()
protected boolean isIntermediate()
protected boolean isFinal()
protected boolean isReachable()
protected boolean isUnreachable()
public boolean isStarted()
public boolean isStopped()
public boolean isCanceled()
public boolean isRestored()
public boolean isSuspended()
public boolean isResumed()
public boolean isFinished()
public boolean isAborted()
public boolean isTimedout()
public boolean isReset()
public boolean canTransition(java.lang.String state)
public boolean canStart()
public boolean canStop()
public boolean canCancel()
public boolean canRestore()
public boolean canSuspend()
public boolean canResume()
public boolean canFinish()
public boolean canAbort()
public boolean canTimeout()
public boolean canReset()
protected boolean transition(java.lang.String state, boolean quiet)
quiet
- if quiet is true, it will not throw TransitionException upon failureprotected boolean start(boolean quiet)
protected boolean stop(boolean quiet)
protected boolean cancel(boolean quiet)
protected boolean restore(boolean quiet)
protected boolean suspend(boolean quiet)
protected boolean resume(boolean quiet)
protected boolean finish(boolean quiet)
protected boolean abort(boolean quiet)
protected boolean timeout(boolean quiet)
public void reset()
ProgressReporter
reset
in class ProgressReporter
protected java.lang.String getProgressEventName()
protected java.lang.String getProgressEventMessage()
protected java.lang.String getProgressEventLocalizedMessage()
protected java.lang.Throwable getProgressEventThrowable()
protected StateInfo getProgressEventStateInfo()
protected StatusInfo getProgressEventStatusInfo()
protected StepInfo getProgressEventStepInfo()
protected PercentInfo getProgressEventPercentInfo()
protected DurationInfo getProgressEventDurationInfo()
protected java.lang.Object getProgressEventProgressInfo()
protected ProgressEvent getProgressEvent()
protected void sendProgressEvent()
public void ping()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |