Skip navigation links


oracle.idm.util.progress
Class ProgressRequestProcessor

java.lang.Object
  extended by oracle.idm.util.progress.ProgressReporter
      extended by oracle.idm.util.progress.ProgressProcessor
          extended by oracle.idm.util.progress.ProgressRequestProcessor

All Implemented Interfaces:
java.lang.Runnable

public abstract class ProgressRequestProcessor
extends ProgressProcessor

This class provides a base implementation for progress event producing tools.

Unlike ProgressProcessor, which allows only direct access to state transitions, ProgressRequestProcessor adds a state transition request queue which only records requests for state transitions. This allows the processor to execute the actual state transition at a later time more convenient for the processor.

See Also:
ProgressProcessor

Field Summary

 

Fields inherited from class oracle.idm.util.progress.ProgressProcessor
ABORTED, CANCELED, FINISHED, progressEventDurationInfo, progressEventLocalizedMessage, progressEventMessage, progressEventName, progressEventPercentInfo, progressEventProgressInfo, progressEventStateInfo, progressEventStatusInfo, progressEventStepInfo, progressEventThrowable, RESTORED, RESUMED, STARTED, STOPPED, SUSPENDED, TIMEDOUT, transitions, TRANSITIONS

 

Constructor Summary
protected ProgressRequestProcessor()
           
protected ProgressRequestProcessor(ProgressManager manager)
           
protected ProgressRequestProcessor(ProgressManager manager, Transitions transitions)
           
protected ProgressRequestProcessor(Transitions transitions)
           

 

Method Summary
protected  void cancel()
          This method calls requestCancel(false).
 boolean canRequestAbort()
           
 boolean canRequestCancel()
           
 boolean canRequestFinish()
           
 boolean canRequestRestore()
           
 boolean canRequestResume()
           
 boolean canRequestStart()
           
 boolean canRequestStop()
           
 boolean canRequestSuspend()
           
 boolean canRequestTimeout()
           
 boolean canRequestTransition(java.lang.String state)
          Checks if the last requested state can be transitioned to the state parameter.
protected  void clearStateQueue()
           
protected  java.util.LinkedList getStateQueue()
           
protected  StateInfo getStateQueueHead()
           
protected  StateInfo getStateQueueTail()
           
protected  StateInfo popStateQueue()
           
protected  void pushStateQueue(StateInfo stateInfo)
           
protected  boolean requestAbort(boolean quiet)
           
protected  boolean requestCancel(boolean quiet)
           
protected  boolean requestFinish(boolean quiet)
           
protected  boolean requestRestore(boolean quiet)
           
protected  boolean requestResume(boolean quiet)
           
protected  boolean requestStart(boolean quiet)
           
protected  boolean requestStop(boolean quiet)
           
protected  boolean requestSuspend(boolean quiet)
           
protected  boolean requestTimeout(boolean quiet)
           
protected  boolean requestTransition(java.lang.String state, boolean quiet)
          This method will push a request to change the state onto the state queue.
 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  void resume()
          This method calls requestResume(false).
protected  void start()
          This method calls super.start().
protected  void stop()
          This method calls requestStop(false).
protected  void suspend()
          This method calls requestSuspend(false).
protected  boolean transition(boolean quiet)
          This method will pop a request to change the state from the state queue, and try to change the current state.

 

Methods inherited from class oracle.idm.util.progress.ProgressProcessor
abort, block, block, block, canAbort, canCancel, cancel, canFinish, canReset, canRestore, canResume, canStart, canStop, canSuspend, canTimeout, canTransition, finish, getProgressEvent, getProgressEventDurationInfo, getProgressEventLocalizedMessage, getProgressEventMessage, getProgressEventName, getProgressEventPercentInfo, getProgressEventProgressInfo, getProgressEventStateInfo, getProgressEventStatusInfo, getProgressEventStepInfo, getProgressEventThrowable, getTransitions, isAborted, isCanceled, isFinal, isFinished, isInitial, isIntermediate, isNext, isPrevious, isReachable, isReset, isRestored, isResumed, isStarted, isStopped, isSuspended, isTimedout, isUnreachable, ping, process, restore, resume, run, sendProgressEvent, setTransitions, start, stop, suspend, timeout, transition

 

Methods inherited from class oracle.idm.util.progress.ProgressReporter
clearTransient, continuing, getDuration, getErrorTotal, getException, getLocalizedMessage, getLocalizedMessages, getMessage, getMessages, getProgressManager, getRuntimeException, getStateCurrent, getStateTimeStamp, getTimeout, getTransient, getWarningTotal, hasTimedout, isStateCurrent, isTransient, markTransient, resetDuration, sendProgressEvent, setErrorTotal, setProgressManager, setStateCurrent, setStateTimeStamp, setTimeout, setWarningTotal, throwErrorOrException, throwErrorOrRuntimeException, throwException, throwRuntimeException, unmarkTransient

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ProgressRequestProcessor

protected ProgressRequestProcessor()

ProgressRequestProcessor

protected ProgressRequestProcessor(ProgressManager manager)

ProgressRequestProcessor

protected ProgressRequestProcessor(Transitions transitions)

ProgressRequestProcessor

protected ProgressRequestProcessor(ProgressManager manager,
                                   Transitions transitions)

Method Detail

start

protected void start()
              throws java.lang.Exception
This method calls super.start().

Subclasses should make this method public.

Overrides:
start in class ProgressProcessor
Throws:
java.lang.Exception

stop

protected void stop()
This method calls requestStop(false).

Subclasses that support STOPPED state should make this method public.

Overrides:
stop in class ProgressProcessor

cancel

protected void cancel()
This method calls requestCancel(false).

Subclasses that support CANCELED state should make this method public.

Overrides:
cancel in class ProgressProcessor

suspend

protected void suspend()
This method calls requestSuspend(false).

Subclasses that support SUSPENDED state should make this method public.

Overrides:
suspend in class ProgressProcessor

resume

protected void resume()
This method calls requestResume(false).

Subclasses that support RESUMED state should make this method public.

Overrides:
resume in class ProgressProcessor

canRequestTransition

public boolean canRequestTransition(java.lang.String state)
Checks if the last requested state can be transitioned to the state parameter.

canRequestStart

public boolean canRequestStart()

canRequestStop

public boolean canRequestStop()

canRequestCancel

public boolean canRequestCancel()

canRequestRestore

public boolean canRequestRestore()

canRequestSuspend

public boolean canRequestSuspend()

canRequestResume

public boolean canRequestResume()

canRequestFinish

public boolean canRequestFinish()

canRequestAbort

public boolean canRequestAbort()

canRequestTimeout

public boolean canRequestTimeout()

requestTransition

protected boolean requestTransition(java.lang.String state,
                                    boolean quiet)
This method will push a request to change the state onto the state queue. If the state transition is now allowed it will return false in the quiet mode, or throw a TransitionException.
Parameters:
quiet - if quiet is true, it will not throw TransitionException upon failure
Returns:
true if requested, false otherwise

requestStart

protected boolean requestStart(boolean quiet)

requestStop

protected boolean requestStop(boolean quiet)

requestCancel

protected boolean requestCancel(boolean quiet)

requestRestore

protected boolean requestRestore(boolean quiet)

requestSuspend

protected boolean requestSuspend(boolean quiet)

requestResume

protected boolean requestResume(boolean quiet)

requestFinish

protected boolean requestFinish(boolean quiet)

requestAbort

protected boolean requestAbort(boolean quiet)

requestTimeout

protected boolean requestTimeout(boolean quiet)

transition

protected boolean transition(boolean quiet)
This method will pop a request to change the state from the state queue, and try to change the current state. If the state transition is now allowed it will return false in the quiet mode, or throw a TransitionException. If it finds no state requests, it will simply return true.
Parameters:
quiet - if quiet is true, it will not throw TransitionException upon failure
Returns:
true if transitioned is allowed or no transitions are requested, false otherwise

reset

public void reset()
Description copied from class: ProgressReporter
This method resets the progress reporter, call when you want to reuse the same progress reporter to report progress on a new process.
Overrides:
reset in class ProgressProcessor

getStateQueue

protected java.util.LinkedList getStateQueue()

clearStateQueue

protected void clearStateQueue()

pushStateQueue

protected void pushStateQueue(StateInfo stateInfo)

popStateQueue

protected StateInfo popStateQueue()

getStateQueueHead

protected StateInfo getStateQueueHead()

getStateQueueTail

protected StateInfo getStateQueueTail()

Skip navigation links