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

E13403-04

oracle.jdevimpl.audit.util
Class Task

java.lang.Object
  extended by oracle.jdevimpl.audit.util.Task

public abstract class Task
extends java.lang.Object

An abstract task executed by a SwingExecutor. A concrete task must override its execute(java.lang.Object) method to execute itself, and must override its commit(java.lang.Object) method to commit its work.

For better responsiveness, a concrete task should also override its cancelExecute() and/or cancelCommit() methods if execute or commit are potentially long running and can be cancelled.

Finally, a task which holds resources between executions should override its close() method to release those resources.


Constructor Summary
Task()
           
 
Method Summary
 void cancelCommit()
          Cancels the current commit.
 void cancelExecute()
          Cancels the current execution.
 void close()
          Closes the task.
abstract  void commit(java.lang.Object output)
          Commits the results of executing this task.
abstract  java.lang.Object execute(java.lang.Object input)
          Executes this task.
abstract  java.lang.String getName()
          Gets the name of this task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

public Task()
Method Detail

execute

public abstract java.lang.Object execute(java.lang.Object input)
Executes this task.

Parameters:
input - input data for this execution of this task.
Returns:
the output data for this execution of this task.

cancelExecute

public void cancelExecute()
Cancels the current execution. The default Task implementation does nothing.


commit

public abstract void commit(java.lang.Object output)
Commits the results of executing this task.

Parameters:
output - output data to be committed for and execution of this task.

cancelCommit

public void cancelCommit()
Cancels the current commit. The default Task implementation does nothing.


close

public void close()
Closes the task. The default Task implementation does nothing.


getName

public abstract java.lang.String getName()
Gets the name of this task.


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

E13403-04

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