Skip navigation links

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

E52944-01


oracle.ide.inspector.task
Class BackgroundTask<V>

java.lang.Object
  extended by oracle.ide.inspector.task.BackgroundTask<V>

All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<V>

public abstract class BackgroundTask<V>
extends java.lang.Object
implements java.lang.Runnable, java.util.concurrent.Future<V>

BackgroundTask

Background task class supporting cancellation, completion notification, and progress notification


Constructor Summary
BackgroundTask()
           

 

Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
protected abstract  V compute()
           
 V get()
           
 V get(long timeout, java.util.concurrent.TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
protected  void onCompletion(V result, java.lang.Throwable exception, boolean cancelled)
           
protected  void onProgress(int current, int max)
           
 void run()
           
protected  void setProgress(int current, int max)
           

 

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

 

Constructor Detail

BackgroundTask

public BackgroundTask()

Method Detail

setProgress

protected void setProgress(int current,
                           int max)

compute

protected abstract V compute()
                      throws java.lang.Exception
Throws:
java.lang.Exception

onCompletion

protected void onCompletion(V result,
                            java.lang.Throwable exception,
                            boolean cancelled)

onProgress

protected void onProgress(int current,
                          int max)

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface java.util.concurrent.Future<V>

get

public V get()
      throws java.lang.InterruptedException,
             java.util.concurrent.ExecutionException
Specified by:
get in interface java.util.concurrent.Future<V>
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException

get

public V get(long timeout,
             java.util.concurrent.TimeUnit unit)
      throws java.lang.InterruptedException,
             java.util.concurrent.ExecutionException,
             java.util.concurrent.TimeoutException
Specified by:
get in interface java.util.concurrent.Future<V>
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface java.util.concurrent.Future<V>

isDone

public boolean isDone()
Specified by:
isDone in interface java.util.concurrent.Future<V>

run

public void run()
Specified by:
run in interface java.lang.Runnable

Skip navigation links

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

E52944-01


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