Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.jdeveloper.vcs.spi
Class VCSWaitRunnable

java.lang.Object
  extended by oracle.jdeveloper.vcs.spi.VCSWaitRunnable
All Implemented Interfaces:
java.lang.Runnable

public abstract class VCSWaitRunnable
extends java.lang.Object
implements java.lang.Runnable

Abstract runnable class for long running tasks, designed to be run on a temporary thread. This utility superclass provides validation of options customizer state, a wait cursor for the duration of the task, exception handling and indeterminate progress monitor management. It also features a SwingWorker-like facility for performing operations on the AWT event thread when the task has completed.


Constructor Summary
VCSWaitRunnable()
          Constructor.
VCSWaitRunnable(VCSExceptionHandler exceptionHandler)
          Constructor.
VCSWaitRunnable(VCSExceptionHandler exceptionHandler, VCSOptionsCustomizer optionsCustomizer)
          Constructor.
 
Method Summary
 java.lang.Exception getException()
          Gets the exception thrown during the task execution, if any.
 IndeterminateProgressMonitor getIndeterminateProgressMonitor()
          Gets the progress monitor.
protected  java.util.Map<?,?> getOptions()
          Gets options from the customizer, for convenience.
 void run()
          
protected abstract  void runImpl()
          Performs the runnable task.
protected  void runPostOperationAWT()
          Performs post-operations on the AWT event thread.
 void setIndeterminateProgressMonitor(IndeterminateProgressMonitor progressMonitor)
          Sets the progress monitor, which will be started and closed during the task execution.
 VCSOptionsCustomizer setOptionsCustomizer()
          Gets the options customizer.
 void setOptionsCustomizer(VCSOptionsCustomizer optionsCustomizer)
          Sets the options customizer, which will be validated before the task is run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCSWaitRunnable

public VCSWaitRunnable()
Constructor.


VCSWaitRunnable

public VCSWaitRunnable(VCSExceptionHandler exceptionHandler)
Constructor.

Parameters:
exceptionHandler - the exception handler to use.

VCSWaitRunnable

public VCSWaitRunnable(VCSExceptionHandler exceptionHandler,
                       VCSOptionsCustomizer optionsCustomizer)
Constructor.

Parameters:
exceptionHandler - the exception handler to use.
optionsCustomizer - the options customizer to validate.
Method Detail

setIndeterminateProgressMonitor

public void setIndeterminateProgressMonitor(IndeterminateProgressMonitor progressMonitor)
Sets the progress monitor, which will be started and closed during the task execution.

Parameters:
progressMonitor - the progress monitor.

getIndeterminateProgressMonitor

public IndeterminateProgressMonitor getIndeterminateProgressMonitor()
Gets the progress monitor.

Returns:
the progress monitor.

setOptionsCustomizer

public void setOptionsCustomizer(VCSOptionsCustomizer optionsCustomizer)
Sets the options customizer, which will be validated before the task is run.

Parameters:
optionsCustomizer - the options customizer.

setOptionsCustomizer

public VCSOptionsCustomizer setOptionsCustomizer()
Gets the options customizer.

Returns:
the options customizer.

getException

public java.lang.Exception getException()
Gets the exception thrown during the task execution, if any. (null-capable)

Returns:
the exception.

run

public void run()

Specified by:
run in interface java.lang.Runnable

runImpl

protected abstract void runImpl()
                         throws java.lang.Exception
Performs the runnable task.

Throws:
java.lang.Exception

runPostOperationAWT

protected void runPostOperationAWT()
                            throws java.lang.Exception
Performs post-operations on the AWT event thread. By default, does nothing.

Throws:
java.lang.Exception

getOptions

protected final java.util.Map<?,?> getOptions()
Gets options from the customizer, for convenience. (null-capable)

Returns:
the customizer's options map.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.